3 ms·
Again what I'm basically asking is - Should you be MEMORIZING solutions, or, expecting yourself to come up with the O(N)/O(1) solutions on your own?
by rubicon33 7y ago
Again what I'm basically asking is -
Should you be MEMORIZING solutions, or, expecting yourself to come up with the O(N)/O(1) solutions on your own?
- lamchob 7y agoWhy are these the only options? Why can't you just know there is a solution, and know where you can look details up? Expecting to find ideal solutions on your own every time is tedious and taking time away from solving the actual problem you are working on.
- rubicon33 7y agoBecause that's not how interviews work, basically. Trust me, I understand that in the real world that's exactly how you would approach these problems.
- shahbaby 7y agoIt's about solving new problems using what you learned from previous problems. You don't need to memorize since 1.) you don't know what parts of the problem will generalize to other problems until you've seen a lot of problems, 2.) by the time you're able to recognize the same pattern repeated in other problems, you've mostly memorized it anyway. What I've found to be the most helpful is taking down notes of new concepts that I've learned. For example, a quick summary of how dijkstra's algorithm works so if I need to use it, I can read my own summary and quickly get up to speed on it.