Essential DSA Topics For Front-End Developers
The importance of Data Structures and Algorithms (DSA) can vary based on different companies. For MAANG companies we will have to be well-versed in the DSA concept. On the other hand, for the second-tier company, the level of DSA knowledge is slightly lower and for the startup company, the knowledge of DSA may be at a more basic level. Here’s a list of important DSA topics.
1. Array
- Check if an array is sorted and rotated
- Merge two sorted arrays
- Program for array left rotation by d positions
- Remove duplicates from Sorted Array
- Leaders in an array
- Stock Buy Sell to Maximize Profit
- Trapping Rain Water
- Maximum circular subarray sum
- Median of two Sorted Arrays of Different Sizes
- Length of the longest alternating even odd subarray
2. String
- Check if given strings are rotations of each other or not
- Length Of Last Word in a String
- Check if two given Strings are Isomorphic to each other
- Find maximum occurring character in a string
- Program to reverse a string
- Reverse words in a given string
- Case-specific Sorting of Strings
- Rabin-Karp Algorithm for Pattern Searching
- Find the starting indices of the substrings in string (S) which is made by concatenating all words from a list(L)
- Longest Valid Parentheses
3. Recursion
4. Searching
- Search an element in an unsorted array using minimum number of comparisons
- Majority Element
- Find a peak element which is not smaller than its neighbours
- Find the two repeating elements in a given array
- Maximum water that can be stored between two buildings
- Search an element in a sorted and rotated Array
- Search in a sorted 2D matrix
- Maximum sum not exceeding K possible for any rectangle of a Matrix
- k-th smallest absolute difference of two elements in an array
- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
5. Sorting
- Sort a binary array using one traversal and no extra space
- Union and Intersection of two sorted arrays
- Maximum product of a triplet (subsequence of size 3) in array
- Find minimum difference between any two elements (pair) in given array
- Sort an array of 0s, 1s and 2s | Dutch National Flag problem
- Merge 3 Sorted Arrays
- K’th Smallest/Largest Element in Unsorted Array
- Find a triplet that sum to a given value
- Maximum adjacent difference in an array in its sorted form
- Sort elements by frequency
6. Matrix
- Print matrix in snake pattern
- Program to find transpose of a matrix
- Rotate a matrix by 90 degree in clockwise direction without using any extra space
- Print a given matrix in spiral form
- Search in a row wise and column wise sorted matrix
- Check if given Sudoku board configuration is valid or not
- A Boolean Matrix Question
7. Hashing
- Implementing own Hash Table with Open Addressing Linear Probing
- Separate Chaining Collision Handling Technique in Hashing
- Quadratic Probing in Hashing
- Happy Number
- Find winner of an election where votes are represented as candidate names
- Distribute N candies among K people
- Check whether the string can be printed using same row of qwerty keypad
- Longest Consecutive Subsequence
8. Linked List
- Reverse a Linked List
- Remove duplicates from a sorted linked list
- Sort a linked list of 0s, 1s and 2s
- Remove duplicates from an unsorted linked list
- Add two numbers represented by Linked List
- Rotate a Linked List
- LRU Cache Implementation
- Merge K sorted linked lists
- Partitioning a linked list around a given value and keeping the original order
- Pairwise Swap Nodes of a given Linked List
9. Stack
- Delete middle element of a stack
- Reduce string by removing outermost parentheses from each primitive substring
- Implement two Stacks in an Array
- The Stock Span Problem
- Design a stack that supports getMin() in O(1) time and O(1) extra space
- Next Greater Element (NGE) for every element in given Array
- The Celebrity Problem
- Largest Rectangular Area in a Histogram using Stack
10. Queue
11. Tree
- Postorder Traversal of Binary Tree
- Find the Maximum Depth or Height of given Binary Tree
- Level Order Traversal (Breadth First Search or BFS) of Binary Tree
- Print level order traversal line by line
- Print Left View of a Binary Tree
- Check for Children Sum Property in a Binary Tree
- Convert a Binary Tree into its Mirror Tree
- Vertical width of Binary tree
- Print all nodes at distance k from a given node
- Construct a Binary Tree from Postorder and Inorder
- Flatten a binary tree into linked list
- Maximum Path Sum in a Binary Tree
12. Binary Search Tree
- Searching in Binary Search Tree
- A program to check if a Binary Tree is BST or not
- Print Common Nodes in Two Binary Search Trees
- Construct BST from its given level order traversal
- Lowest Common Ancestor in a Binary Search Tree
- Deletion in Binary Search Tree (BST)
- Find the closest element in Binary Search Tree
- Merge two BSTs with limited extra space
- Two nodes of a BST are swapped, correct the BST
13. Heap
14. Graph
- Distance of nearest cell having 1 in a binary matrix
- Minimum time required to rot all oranges
- Find the number of islands using DFS
- Level of Each node in a Tree from source node (using BFS)
- Find the number of islands using DFS
- Detect cycle in an undirected graph
- Detect Cycle in a Directed Graph
- Check if removing a given edge disconnects a graph
- Clone an Undirected Graph
- Clone a Directed Acyclic Graph
15. Backtracking
16. Dynamic Programming
- Count all possible paths from top left to bottom right of a mXn matrix
- Sum of all substrings of a string representing a number
- Count ways to reach the n’th stair
- Minimum number of jumps to reach end
- Longest Increasing Subsequence (LIS)
- Maximize the number of segments of length p, q and r
- 0/1 Knapsack Problem
- Egg Dropping Puzzle
How Much DSA is Required For Front End Developer Interview?
Front-end developer creates the user-facing component such as the user interface(UI) and user experience(UX), that determines how the user interacts with the digital product. Front-end engineer works with generally HTML, CSS, JavaScript, and frameworks like React or Angular. But having a solid foundation in DSA, we can optimize the performance of the website and deliver a great user experience.
In this article, we will explore the importance of DSA, why is it necessary, and How much DSA is required for the front end.
Contact Us