Last update: June 26, 2023
Why Data Structures and Algorithms are so important to programmers?
Data Structures and Algorithms can save us a huge amount of time and money. Let's get a closer look in this 5-minutes article on how to learn DSA.
Index
If you would like to learn Data Science, Programming or change your career to tech industry, visit DANGER Education website and enroll the interested courses now!
Consider a simple problem below:
If you need to search your employee ID in a PDF document with 10,000 pages (employee IDs are arranged in increasing order), how would you do?
- You may search it randomly or page by page, which will take so much time and you will get frustrated eventually
- You may first go to page no. 5,000 and search your employee ID. If it is not there and all employee IDs on that page are smaller than yours, go to page no. 7,500. If it is not there and all employee IDs on that page are larger than yours, go to page no. 6,250…… repeat the process several times
If you choose the second way, congratulation! You have just implemented a Binary Search algorithm. Let’s learn what is Computer Science and algorithm.
Data Structures and Algorithms play a major role in Big Tech hiring process
Whenever we have a problem, we will seek help from the person who can solve it in the shortest time with efficiency and fewer resources. The same happen with Big Tech like Facebook and Google, except the problems faced by them are at a much larger scale and much harder. That’s why they treasure developers who are familiar with Data Structures and Algorithms (DSA), instead of programming language and frameworks.
In Big Tech interview, interviewers are generally interested in seeing how candidates can use those DSA like Tries, Trees, Graphs and Hash Tables to solve a given problem. They are looking for a candidate who can find a right tool for a given problem. So it is important for programmers to know the characteristic of each common DSA including:
- Array
- Set
- Linked List
- Stack
- Queue
- Tree
- Graph
Right DSA can save Big Tech a huge amount of money
Why Big Tech engineers are paid much higher than other companies?
In those companies, coding just takes around 20-30% of the time allocated to a project. Most of the time goes to designing the best DSA which can save company resources including computation power and servers. Imagine you are working for Facebook, Instagram or YouTube, which have more than 500 million daily active users. To implement a new features, it requires more optimization to be done in order to handle more users for these products. That’s why these product-based companies only hire developers who can optimize the software with the right DSA as per user demand.
The bad news is, it is not enough to just provide a working DSA solution to a problems during those Big Tech interview. Usually the solution has to be run at a certain level of performance with time or space complexity (it is described in O notation). So be prepared to tell the interviewers what the time and space complexity of your proposed solution is.
How to study DSA?
Always practicing it after studying the new topic you have just learnt. First you have to focus on understanding what the concept is and why does it work. Once you are familiar with the concept, you should time yourself and aims for faster solution times. Because during an interview, you will be expected to solve a problem within 15-30 minutes.
Sites like leetcode.com and hackerrank.com can let you search for practicing questions. Keep track of your completion times and aim for completing most medium level questions within 40 minutes.
When you are comfortable with the practicing topics, find a friend to run a Mock interview with you. Because during an interview process, you will be interacting with interviewer who is judging your skills in real-time, which is more stressful than studying yourself at home. A mock interview with real person will help you get around the awkwardness and anxiety of a real interview so you can focus on the technical part.
Summary
Arranging data in a specific structure is really helpful in saving a lot of time and resource because it allows us to manipulate or use them easily. We all want to use our time, energy and resources wisely. We all want to choose the best approach to solve the problems. So it is important for programmers to learn DSA, no matter you would like to work in Big Tech or not.
The good news is, most Big Tech engineers are not DSA experts, they also needed to study hard for 4-10 weeks to pass their interview. So draft your DSA study plan today and learn the high level programming skills!