# Top 100 Most Liked Data Structures and Algorithms Problems

- Find a pair with the given sum in an arrayEasy
- Longest Common Subsequence ProblemMedium
- Deletion from BST (Binary Search Tree)Medium
- Level order traversal of a binary treeEasy
- Insertion in a BSTEasy
- Tree Traversals – Inorder, Preorder, and PostorderMedium
- 0–1 Knapsack ProblemMedium
- Longest Increasing Subsequence using Dynamic ProgrammingHard
- Subset Sum Problem – Dynamic Programming SolutionMedium
- Longest Palindromic Subsequence using Dynamic ProgrammingMedium
- Matrix Chain Multiplication using Dynamic ProgrammingHard
- Print all subarrays with 0 sumMedium
- Longest Common Substring ProblemMedium
- Find the shortest path in a mazeMedium
- Find subarrays with a given sum in an arrayMedium
- Check if two binary trees are identical or notEasy
- Rod Cutting ProblemMedium
- Find the first or last occurrence of a given number in a sorted arrayEasy
- Construct a binary tree from inorder and preorder traversalHard
- Word Break Problem – Dynamic ProgrammingHard
- Find all possible palindromic substrings of a stringHard
- Count number of islandsMedium
- The Levenshtein distance (Edit distance) ProblemMedium
- Inversion count of an arrayHard
- Chess Knight Problem | Find the shortest path from source to destinationHard
- Partition Problem using Dynamic ProgrammingMedium
- Check if a subarray with 0 sum exists or notMedium
- Find the largest number possible from a given set of numbersMedium
- Change all elements of row
`i`

and column`j`

in a matrix to 0 if cell`(i, j)`

is 0Medium - Find k’th smallest element in an arrayMedium
- Determine whether a given binary tree is a BST or notMedium
- Minimum Sum Partition ProblemHard
- Build a Binary Search Tree from a preorder sequenceHard
- Find the maximum difference between two array elements that satisfies the given constraintsMedium
- Sort binary array in linear timeEasy
- Snake and Ladder ProblemHard
- Merge two sorted linked lists into oneMedium
- Find the duplicate element in a limited range arrayMedium
- Find k’th largest element in an arrayMedium
- Find the shortest path from source to destination in a matrix that satisfies given constraintsHard
- Find the largest subarray formed by consecutive integersMedium
- Find the total number of unique paths in a maze from source to destinationMedium
- Find maximum length subarray having a given sumMedium
- Sort an array of 0’s, 1’s, and 2’s (Dutch National Flag Problem)Medium
- Find the missing number in an array without using any extra spaceEasy
- Find maximum length subarray having an equal number of 0’s and 1’sMedium
- Find the diameter of a binary treeMedium
- Find the maximum product of two integers in an arrayEasy
- Longest Palindromic Substring ProblemMedium
- Move all zeros present in an array to the endEasy
- Print all possible Knight’s tours on a chessboardHard
- Search a given key in BSTEasy
- Find maximum sum submatrix present in a matrixMedium
- Print matrix in spiral orderMedium
- Find the size of the largest square submatrix of 1’s present in a binary matrixMedium
- Find the Lowest Common Ancestor (LCA) of two nodes in a binary treeMedium
- Job Sequencing Problem with DeadlinesMedium
- Print all possible solutions to N–Queens problemHard
- Rearrange linked list in increasing order (Sort linked list)Medium
- Check if a linked list is palindrome or notMedium
- In-place merge two sorted arraysMedium
- Count occurrences of a number in a sorted array with duplicatesMedium
- Find maximum cost path in a graph from a given source to a given destinationMedium
- Print top view of a binary treeMedium
- Find all possible combinations of words formed from the mobile keypadHard
- Check if an undirected graph contains a cycle or notMedium
- Find all distinct combinations of a given lengthMedium
- Find minimum cost to reach the last cell of a matrix from its first cellMedium
- Longest Repeated Subsequence ProblemMedium
- Maximum Product Subarray ProblemHard
- Compute the least cost path in a weighted digraph using BFSMedium
- Find a triplet with the given sum in an arrayMedium
- Evaluate a postfix expressionEasy
- Shortest Common Supersequence ProblemMedium
- Find the path between given vertices in a directed graphEasy
- Print left view of a binary treeEasy
- Maximum Sum Circular SubarrayHard
- Rearrange an array with alternate high and low elementsMedium
- Print all distinct subsets of a given setHard
- Find maximum profit earned by buying and selling shares any number of timesMedium
- Print all combinations of numbers from 1 to
`n`

having sum`n`

Medium - Find inorder successor for the given key in a BSTMedium
- Find k’th smallest and k’th largest element in a BSTEasy
- Find the maximum sum of a subsequence with no adjacent elementsMedium
- Right rotate an array
`k`

timesEasy - Maximum Subarray Sum using Divide and ConquerMedium
- Find ancestors of a given node in a binary treeMedium
- Find the number of rotations in a circularly sorted arrayEasy
- K–Partition Problem | Printing all partitionsHard
- 3–Partition ProblemMedium
- Find the peak element in an arrayMedium
- 4–Sum Problem | Quadruplets with a given sumMedium
- Insert a node to its correct sorted position in a sorted linked listEasy
- Print bottom view of a binary treeMedium
- Find the minimum number of deletions required to convert a string into a palindromeMedium
- Build a binary tree from a parent arrayHard
- Wildcard Pattern MatchingHard
- Bipartite GraphMedium
- Spiral order traversal of a binary treeMedium
- Check if a binary tree is a complete binary tree or notMedium

Also See:

**Thanks for reading.**

To share your code in the comments, please use our online compiler that supports C, C++, Java, Python, JavaScript, C#, PHP, and many more popular programming languages.

**Like us? Refer us to your friends and support our growth. Happy coding** :)