10 Data Structure and Algorithm Books to Level Up Your Programming Skill
My favorite books to learn Data Structure and Algorithms in depth
Algorithms are language agnostic and any programmer worth their salt should be able to convert them into code in the programming language of their choice, but at the same time, it's easier to learn if examples are presented in the programming language of your choice.
Unfortunately, I have come across several programmers who are REALLY good at programming languages like Java or Python like knows minor details of API and language intricacies but has very poor knowledge of fundamentals Algorithms and Data Structure.
Just ask them to implement any popular sorting algorithms like quicksort or merge sort and they will fall apart.
If you expect them to know more advanced and complex algorithms like String algorithms, graph algorithms, tree traversal or greedy algorithms, be ready to check on Interviews, otherwise, you might end up with some surprises.
Once, I come across a very good candidate for a core Java senior developer role, he was excellent in Java, multi-threading but his data structure and algorithm skill was really poor to his experience and caliber.
When I asked him, why he didn't spend time brushing his algorithm and problem-solving skill before coming to the interview?
His excuse was "those algorithms are just for interviews and never really used in practical coding. I have never used them in my 6 years of Java development career".
He was somewhat right, you don't need to implement a hash table in Java, you can always use the HashMap class or Dictionary in Python for that sense but he failed to recognize the more long term improvement algorithm and data structure do in improving programming skill.
Algorithms are tools for developing programming solving skills and coding sense, which is required to convert a user requirement into the line of code also known as a computer program.
They are also all around, if you use Facebook, have you ever thought about how they find your friends so easily? Or how does Netflix recommends the movie you want to watch? Those are just a couple of examples of Machine Learning Algorithms, which is taking Algorithms to another level.
In recent years, I also found that joining a solid algorithms and data structure course like Master the Coding Interview: Data Structures + Algorithms on ZTM academy also helps to learn DSA better. You can use them to prepare quickly for your interview along with these books.
Without any further ado here are the best DSA books you can read to improve your programming and problem solving skills
Keep reading with a 7-day free trial
Subscribe to Javarevisited Newsletter to keep reading this post and get 7 days of free access to the full post archives.