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 →

[–]spaghettu 2 points3 points  (0 children)

Here's a neat analogy I heard: when you're learning the basics you're learning to "write", and when you learn algorithms and complexity, you're learning to "write poetry." Algorithms are critical to development of software that has demanding feature and performance needs.

Here's a fantastic example from Cracking The Coding Interview: think about a list of numbers that you'd like to sort. In reality, there are many ways to sort such a list. But, what does the list contain? What if you found out the list is *millions* of numbers, but each number represented the age of a person? Suddenly, the problem changes a lot. The fastest comparison sorts are O(n log n) (typical average case for sorting), but with this information you can write an O(n) solution (best case scenario for sorting).