Open
Description
Real quick, loving the tech interview handguide! I just wanted to make one suggestion to the matrix cheat sheet page which I think would be really beneficial for users, which is adding some tips about how to find row and column index given overall index in a 2D matrix. I was recently working on leetcode #74 "Search a 2D Matrix" and I was pretty stumped until I read the discussions and someone gave a helpful hint of dividing the overall index by the number of columns to get the row index, and doing a modulo operation by the number of columns. Basically like matrix[index/col][index%col]. I think that would be a really helpful tip for others.
Metadata
Metadata
Assignees
Labels
No labels