Algorithms and Data Structures | Why does it matter
This video is going to convince you to head to LeetCode and start practicing some Algorithms and Data structures problems even if you are THAT software engineer !
I recently published this video on my YouTube channel where I explained with examples why there is A difference between developers and developers who practice Algorithms and data structures. In this blog post am summing up the major points of the video for those of you who are rather active learners 📚 than passive ones 🍿 .
Before diving into the basic algorithms and why is it important to know them and to know when to use each, we have first to understand three points:
Once we are clear on what difference does it make to write code with time and space cost considerations because you often practice ADS problems, we can pass to learn about the basic algorithms and the basic data structures.
Big O Notation and Time/Space Complexities
Because this post is just an extension to what came in YouTube every topic is going to be simplified and sometimes even just bullet-listed!
- Big O Notation is a mathematical expression which we use to express the relationship between the growth of the input size of an algorithm or a program and the growth of the runtime or memory space consumed by that algorithm.
- Time Complexity is the relationship between the growth of the input size of an algorithm or a program and the growth of the runtime consumed by that algorithm.
- Space Complexity is the relationship between the growth of the input size of an algorithm or a program and the growth of the memory space consumed by that algorithm.
Learning how to write code that reduces the time and space complexities to the minimum possible is what makes a developer an excellent one. Having a team of developers with this cost reduction mindset is what makes a product a best performing one.
In order to learn how to make your feature’s code “cost reduction oriented” you have to keep these three notions in mind and practice the basic problems that train you to do so, all regardless of your level of seniority or your expertise with a specific framework.
The basic Algorithms in Computer Science
You do not need to be aware of, learn about, and practice the common algorithms just for the sake of doing it. These algorithms are blueprint solutions for a set of common problems in computer science, which sooner or later and depending on your project’s scale you will find yourself solving.
- Such common problems can be searching data collections or sorting them for example.
- Examples of these common algorithms which you have to be aware they exist regardless of your guru level at React (as an example) are BFS, DFS, Merge sort, Heap sort, ect. Other videos in my channel explain each of these in details.
Good software engineers are very knowledgeable of these algorithms and they know which is to – or might – be used when. Besides, practicing ADS problems where you are given a problem that requires one of these algorithms to be solved makes you a better problem solver and helps you make “seeing the bigger picture” a second nature.
The Structure of a Data Structure
Similar to practicing the fundamental algorithms and getting familiar with them, knowing the implementation details of a data structure that you use very often and understanding how is it internally built, how does it take up space in memory and what are the differences in operations between the various data structures makes an excellent software engineer who knows what they’re doing.
- Basic data structures to practice using and implementing are arrays, queues, stacks and linked lists.
- Then in another phase and after bridging with linked lists, you can pass to trees and graphs.
You will enhance your algorithmic – and analytical – thinking skills by practicing data structures and algorithms problems, and it will make a more effecient developer who writes better performing applications.
Wrapping up
This post is a wrap up itself and it’s the first of its kind here ! I listed in a very light way what I explained in depth in the video, as I mentioned in the beginning, the video is going to convince you to head to LeetCode and start practicing some ADS problems even if you are THAT software engineer !
Recent Comments