DEV Community

Cover image for Is learning Algorithms and Data Structures as Frontend Developer worth it?
Szymon Sadowski
Szymon Sadowski

Posted on • Edited on

Is learning Algorithms and Data Structures as Frontend Developer worth it?

As a Frontend Developer, I believe that data structures and algorithms are often neglected. We tend to focus on topics such as frameworks, new infrastructure tools, and styling options, while basic computer science concepts are left behind, particularly for self-taught developers.

Table of contents

Why would you learn them?

There are many reasons here are the things I think are really important:

  1. Problem-Solving Skills. If you ever tried to solve any leetcode or hackerrank problem and it was hard for you learning DS and Algo will really help you. Later you will also be able to use this skills in real life.
  2. More Efficient Code, learning a thing or two about time and space complexity let’s you understand what’s really happening and what is the most optimal way to solve a problem. And we are all about performant code!
  3. Learning basic concepts let’s you switch technologies later on. Even if you migrate from TS to Rust CS fundamentals will stay the same. Don’t close doors, open them.

The Importance of Data Structures and Algorithms in the Hiring Process

There is no way around it. Data structures and algorithms are important in the hiring process because they are fundamental to computer science and software engineering.

Demonstrating knowledge of these concepts is often expected in technical job interviews and is a standard benchmark for evaluating technical proficiency. If you want to enhance your career opportunities - many companies require candidates to have knowledge of this topic during technical interview - you have to get through it! By learning these concepts, you can improve your chances of landing a job or advancing in your current role.

Ok, You have me so what I should learn?

DS

  1. Arrays: Basic data structure that is everywhere. They are like brick to a building, more complex structures are build out of it. (For people that are used to “arrays” in JS this could be eye-opener!)
  2. Linked Lists: A linked list is a data structure in which each element (node) contains a reference to the next node in the list. Linked lists are often used to implement other data structures, such as stacks and queues.
  3. Binary Trees: A binary tree is a hierarchical data structure in which each node has at most two children. Binary Trees are optimization monsters and can come really handy.
  4. Hash Tables: A hash table is a data structure that uses a hash function to map keys to values, allowing for efficient retrieval of data.
  5. Graphs: A graph is a data structure that consists of a set of nodes (vertices) and edges that connect them. Graphs are used to model relationships between objects. If someone will try to explain them to You there is 90% chance they will use flights or social networks.

Each of these data structures has its pros and cons. Although arrays are the most common, after understanding linked lists and binary trees, you will be able to see how you can replace them with more performant structures. Graphs, especially weighted graphs, are the hardest to understand, so I recommend ending your learning with them.

Algo

  1. Sorting Algorithms: Sorting algorithms are used to arrange data in a specific order. Some commonly used sorting algorithms include Quicksort, Mergesort, and Heapsort. These algorithms are used in everyday programming tasks, such as sorting an array or a list of items. Understanding the basic concepts behind them, especially time and space complexity, is essential for any programmer.
  2. Recursion: Recursion is a powerful technique used in programming that involves a function calling itself. Although it can be hard to understand at first, learning how recursion works will help you tackle many programming problems more efficiently. I recommend reading the chapter on recursion in "A Common-Sense Guide to Data Structures and Algorithms" by Jay Wengrow.
  3. Breadth-First Search and Depth-First Search: These are two popular algorithms used for tree structures. They are commonly used in solving problems on platforms like LeetCode. Learning them will help you understand graph algorithms better.

From What Should I learn?

Two “Musts” for me are:

  • "A Common-Sense Guide to Data Structures and Algorithms" by Jay Wengrow.
  • "The Last Algorithm Course You Will Ever Need" by ThePrimegen on Frontend Masters (it's free!)

Here are some more “academic” books that are still really good even for begginer:

  1. "Introduction to Algorithms" by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein: It is considered a standard reference for computer science students and professionals.
  2. "Data Structures and Algorithms Made Easy" by Narasimha Karumanchi: This book provides a practical and easy-to-understand introduction to data structures and algorithms. Problem with it for me that examples are in Java or C++.
  3. "Cracking the Coding Interview" by Gayle Laakmann McDowell: This book will help you prepare for next technical interview!

Summary

If you are a developer looking to improve your problem-solving skills, write more efficient code, and better understand how software works, then learning data structures and algorithms is a must. Even if you don’t think that you will apply to Google and knowledge of how to invert binary tree will be useful trust me some of the concepts will really have an impact on you as a developer.

While it may take time and effort to master these concepts, the rewards are definitely worth it. And with so many resources available to help you learn, there has never been a better time to start.

If you have any comments, opinions or more resources please drop them in the comments below!

Top comments (0)