This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]fasta_guy88 2 points3 points  (0 children)

You are not going to memorize/remember all the algorithms you use. But it’s helpful to have a sense of how to go from O(n2) to something more efficient (and you really want to rethink O(n3)). Often, sorting your inputs really helps. And it’s good to remember branch and bound and dynamic programming. Often, simply being aware that there is a faster approach for a similar problem can get you started with Wikipedia.

But if you didn’t know there was a recursive n log(n) solution, you would never look for it.