Sunday, February 7, 2016

Week 2 of algorithms part 1

I have finished the second week of my coursera algorithms course.

Last week, I felt a little bit short on time, so I shifted things around a bit. On the weekend, I completed all lectures and exercises. During the week, I was able to finish the programming assignment in a couple of days and then comfortably go through the job interview questions. Getting the lectures and exercises done on the weekend is the key to me doing the work carefully instead of rushing to the end.

The exercises can be a bit annoying. I often had to do them multiple times because I kept getting one of the true or false questions wrong. On the plus side, it forces you to go through the algorithms carefully a bunch of times.

This week, we learned about stacks, queues and some elementary sorts. As a real programmer, we use these so often without thinking about how they are implemented. It's good to dig into the details every once in a while. Hopefully more complex topics are on the way.

The programming assignment was a little bit more interesting this week. We built data structures that were modified versions of the stacks and queues that we learned about in class. This was better than the previous week where we just used API's that used the data structures discussed in class.

The other thought I had while working through things this week was how nice Java + the eclipse IDE is compared to my normal C++ + vim working environment. On the IDE side of things, the autocomplete is so nice. On the language side, a feature like "Implements" seems much cleaner than in C++. In C++, we'd have to inherit a pure virtual interface class. While logically equivalent, it seems a little bit cleaner in Java. However, that might be a biased opinion, as I am a C++ programmer who is learning Java.

No comments:

Post a Comment