Data Structures & Algorithms Learning Week 1

Data Structures & Algorithms


During my learning journey, I have found that my knowledge of computer science especially Data Structures & Algorithms is lacking. How do I know it? It is simple. During my practice on codesignal, I have found that there are some problems that I was able to solve it. However , the time to execute my algorithms exceeded the time limit allow for some very large cases. And why? Because of my lack of knowledge on those fundamentals of course.

As a result, this week I was spending my time to drill on those fundamental

And It was Harder Than It Sounds

Well, how many time you will say that in your life? I have found that during my long gone business executive life, I said that some times. However, during learning programming, I have said it many times probably already more than the time I had said it before learning programming.

You now might think “What the hell are you saying?”.  Please be patient here is my story. I dug up some courses about Data Structures & Algorithms on LinkedIn Learning and Pluralsight. I even found CS50 YouTube channel from Harvard about computer science and learn a lot from it. And this week I was very happy to sit all day and consume those courses. For the high-level perspective, the ideas and theory are understandable. Some even are easy to understand. And I even told my self that I could learn Data Structures & Algorithms in a few days

However, Programming is all about application right? Learning like above is not deep enough and I tried to implement those high-level things above into code to gain a deeper understanding. Meaning I tried to code to remake all those classes and algorithms.  And it becomes a daily habit to shout every day : “Oh Holy Buddha above please help me . These things are so much harder than it sounds”

My Struggling (skip this part if you don’t want to read my struggle)

Due to my previous learning, I had some knowledge of computer science fundamental like binary, memory …. . As a result, I was ready and happy to dive right to the Linked List as the first thing to learn. To save your time this section I will talk only about the implementation part (meaning the part that I would write code) because the high-level part is very easy to find on the internet and not too difficult to understand

To continue the story , I was first hit when I found my self writing the Linked List class from scratch. First the Node class then the LinkedList that uses the Node class. Long story short, it was fun and by googling and learning web from web I was able to write it from scratch but it was longer than I expected: nearly half a day for both Singly and Doubly Linked List. The same to Stack and Queue as I used LinkedList and Array to implement them.

 The second hit was struck when I try to write a Binary Tree especially the remove method. I am now still awe of the complex of this class and I still leave behind an implementation that I suspected there are still a lot of bugs

Then comes the third hit when I try to write String hashing algorithms. It took half a day just to write 2 simple hashing algorithms: the additive hashing and the folding hashing algorithms plus I was too tired to write my own Hash Table from scratch

The fourth and the last was the time when I need to learn about the sort algorithms. The bubble, insertion and selection sort were not too difficult but merge sort and quick sort were especially hard. Not to mention although I can write merge sort by using iterative but learning and using recursion is the normal norm to write both merge sort and quick sort. And to be honest learning recursion was not easy, I was only able to write simple algorithms using recursion (for example: the Euclid greatest common divisor algorithm and factorial algorithm….)

And the worst part is it has already been a week and I can only finish half of the materials: the easier half while I can see a lot of hardness next week.

The Moral Of The Story

Thank you for your reading, I was able to bore you a lot when talking about my struggling (I think?). However, I only want to point out to you that learning programming theory is 1 thing but able to apply it is another thing. In programming, there is no such things as too easy and no need to dive deeper but only I cannot or I don’t have time to dive deeper. If you think something is too easy, then wait until you dive deeper and rebuild it and you will surprise how complex it was built upon. Remember a concept in programming may be built on many other concepts and going to its core is the only deep understand you can be proud of

The second and final moral of the story is that you should not forgo the fundamental. Sooner or later it will come back and bite you. Every building is built by using A brick at a time. Every complex soccer technique is built upon basic technique. The same holds true for programming. Lacking the fundamentals and your complex knowledge will crumble when it needs to be updated. And trust me programming will require you to update a lot.

I think I have talked a lot already and waste a lot of your time. Time is short and I need to get back to my studying. So I wish you can at least learn something from my story and happy learning. Also, You can see my projects to implement Data Structures & Algorithms for your reference

Leave a Reply

Your email address will not be published. Required fields are marked *