Robert Sedgewick's Algorithms has been one of the best for me, not only as a general refresher on algorithms, but also as a way of better understanding complexity notations.
I enjoyed the lectures quite a bit, but ran into a lot of trouble with the problem sets. I'm wondering if anyone else had a similar experience, or if I should give it another chance and try some different approach?
The problem I had was that he gave you a mostly finished program which utilizes the percolation algorithm, but then asks you to fill in some data structures and functions to make it work, and finally a test suite should let you know if you've completed that successfully. The issue I had was that there was basically no feedback, or incremental progress that you could make towards a solution. You either understand the full requirements and are able to implement them, or your tests fail and you have to scratch your head some more wondering if you misunderstood the problem or what.
I loved the approach that Tim Roughgarden's stanford algorithms class took on Coursera, where you're actually implementing the full algorithm and are given some data sets to test them on. You could even write it in whatever language you choose.
I really wanted to do professor Sedgewick's course but I felt like I couldn't do the assignment even if I understood the algorithm perfectly. Would love some advice if anyone has any suggestions, or even if someone can confirm that I'm not crazy for having a bad time with it.
I did not run into any trouble with Sedgewick's course. His coding assignments are the most elegant and comprehensive I have seen which leave virtually no room for ambiguity. But they are challenging indeed.
> "he gave you a mostly finished program..."
What? He gives you an API with public methods and you have to do the implementation. How is this a mostly finished program?
> "The issue I had was that there was basically no feedback"
The tests are your feedback. When a test fails you need to figure out why the test is failing and what's wrong with your code or if you understood the requirements incorrectly.
I absolutely enjoyed his courses and finished both of them with all the assignments. His assignments are not something you can knock out in an hour. It usually took me at least 3-4 hours to complete any assignment sometimes even more than that.
I also did Roughgarden's course and loved it. He is an awesome teacher. Both Sedgewick's and Roughgarden's courses are very good but they have different approaches. I found Roughgarden's coding assignment a lot easier than Sedgewick's.
Make use of the course forum. If something is not clear ask questions on the forum. Though I found that Sedgewick's requirements specification are very comprehensive and unambiguous. In fact while doing the course I wished software requirements on the job were anywhere close to that comprehensive in real life.
The best way to handle test failure is read the output in detail and see why. If it’s performance (not fast enough) then I usually found that I’d missed a point in the lectures that greatly sped things up. None of the solutions require careful hand optimization, they are well designed to require the right algorithm and data representation. Another problem you may run into is correctness. Some of the tests have tricky edge cases and you can try to see from the test output what that case is and simulate it yourself. You’re not crazy though, some of the exercises are hard and I asked for help in the forums when I got stuck .
I had a similar problem. The problem sets often left me very confused, and were more focused on using the algorithm in unique ways (which is valid but not necessarily my priority) than understanding how they worked.
Really liked that Tim's course let you build an intuitive understanding of algorithms, so you can build them just by thinking about the problem, instead of getting bogged down in optimization details.