4 ms·
Your comment reminds me of frustrations I ran into when going the opposite direction in college. I majored in mathematics (focusing on pure math) where the goal
by glaurung_ 8y ago
Your comment reminds me of frustrations I ran into when going the opposite direction in college.
I majored in mathematics (focusing on pure math) where the goal is typically to produce a solution which is as elegant and readable as possible. In the couple of programming classes I took for my minor, I tended to follow this same approach. If I could write a sexy three line recursive statement that solved the problem in O(n^2) rather than some convoluted nest of loops and tests that did it in O(nlogn) I wanted to go with the first one! It was really hard to make the mental shift from trying to produce something elegant and concise to something fast and memory efficient.