3 ms·
As someone who was pretty "good" at math and CS algorithms, I'll let you in on a little secret: None of this is comes naturally to me. I struggle when encounter
by skylark 10y ago
As someone who was pretty "good" at math and CS algorithms, I'll let you in on a little secret: None of this is comes naturally to me. I struggle when encountering new ideas that I've never seen before. I've bombed easy technical interview questions because I couldn't make the right logical leap.
I still got good grades back in the day because I worked hard. I ground problems until things made sense. Every problem you do adds to your problem solving toolbelt. As your toolbelt grows, you start noticing patterns and you can apply those tools to these new problems. I rarely have to derive things from first principles because I've seen so many different problems at this point.
Some people think that I'm unusually smart or have a natural aptitude for these things. That can't be further from the truth - I don't think this comes naturally to most people. You just work at it until you get good at it.
The best textbook I've found for Algorithms is the one used at Princeton: Sedgewick's "Algorithms." It's extremely practical and doesn't go into too much of the math/proofs behind the algorithms themselves. From there, just grind problems until it makes sense.