|
|
|
Ask HN: How should I study algorithms and datastructures?
|
|
29 points
by PixZxZxA
3350 days ago
|
|
Dear all, I am currently studying towards a Bachelor's degree in Computer Science in Sweden. Right now I am attending a course called "Algorithms and datastructures", where we get an introduction to sorting, searching, priority queues etc. If feel that I need to spend a lot of time in order to really understand the essence of the algorithms, which gets very time consuming when you need two days only to understand insertion sort and merge sort. How do I study these topics the most efficiently? How well should I know certain algorithms and datastructures? |
|
Long answer:
The Algorithms and Data Structures course is one of the foundational courses of a CS degree. Even if you think you don't need to be able to implement the algorithms you learn in your work later on, it is important to have some idea of which algorithms exist for a given task.
Also, and perhaps even more importantly, understanding how these algorithms work really hones your problem solving skills. You learn how to abstract the information given to you as part of a problem into an appropriate data structure, and what kind of operations you can carry out with which data structures. You learn how to cope with several different layers of abstraction and develop an intuition for programming approaches that are fast and/or light on memory. Basically, the ADS course doesn't teach you how to be a programmer, but how to think like one.
As for studying for this course: there's nothing like doing it yourself. Chances are, you already have to do so anyway as part of your course work. Take the programming tasks seriously and really do try to do it yourself. (Get friends to help you by all means, but don't let them do the work for you.)
I would advise you not to slack either: based on your information and the ADS course at my uni, I'm guessing that you're still at the very beginning of your degree. It isn't going to get easier in terms of workload, and the algorithms you learn about later on in the course are a lot more complicated than those at the beginning. But if you've made the effort to understand the first bunch of algorithms, you'll be in good shape to understand the latter ones too. So yes, it is hard work, but you can do it :-)