Misc

Top 100 Most Liked Data Structures and Algorithms Problems

  1. Find a pair with the given sum in an arrayEasy
  2. Longest Common Subsequence ProblemMedium
  3. Deletion from BST (Binary Search Tree)Medium
  4. Level order traversal of a binary treeEasy
  5. Insertion in a BSTEasy
  6. Tree Traversals – Inorder, Preorder, and PostorderMedium
  7. 0–1 Knapsack ProblemMedium
  8. Longest Increasing Subsequence using Dynamic ProgrammingHard
  9. Subset Sum Problem – Dynamic Programming SolutionMedium
  10. Longest Palindromic Subsequence using Dynamic ProgrammingMedium
  11. Matrix Chain Multiplication using Dynamic ProgrammingHard
  12. Print all subarrays with 0 sumMedium
  13. Longest Common Substring ProblemMedium
  14. Find the shortest path in a mazeMedium
  15. Find subarrays with a given sum in an arrayMedium
  16. Check if two binary trees are identical or notEasy
  17. Rod Cutting ProblemMedium
  18. Find the first or last occurrence of a given number in a sorted arrayEasy
  19. Construct a binary tree from inorder and preorder traversalHard
  20. Word Break Problem – Dynamic ProgrammingHard
  21. Find all possible palindromic substrings of a stringHard
  22. Count number of islandsMedium
  23. The Levenshtein distance (Edit distance) ProblemMedium
  24. Inversion count of an arrayHard
  25. Chess Knight Problem | Find the shortest path from source to destinationHard
  26. Partition Problem using Dynamic ProgrammingMedium
  27. Check if a subarray with 0 sum exists or notMedium
  28. Find the largest number possible from a given set of numbersMedium
  29. Change all elements of row i and column j in a matrix to 0 if cell (i, j) is 0Medium
  30. Find k’th smallest element in an arrayMedium
  31. Determine whether a given binary tree is a BST or notMedium
  32. Minimum Sum Partition ProblemHard
  33. Build a Binary Search Tree from a preorder sequenceHard
  34. Find the maximum difference between two array elements that satisfies the given constraintsMedium
  35. Sort binary array in linear timeEasy
  36. Snake and Ladder ProblemHard
  37. Merge two sorted linked lists into oneMedium
  38. Find the duplicate element in a limited range arrayMedium
  39. Find k’th largest element in an arrayMedium
  40. Find the shortest path from source to destination in a matrix that satisfies given constraintsHard
  41. Find the largest subarray formed by consecutive integersMedium
  42. Find the total number of unique paths in a maze from source to destinationMedium
  43. Find maximum length subarray having a given sumMedium
  44. Sort an array of 0’s, 1’s, and 2’s (Dutch National Flag Problem)Medium
  45. Find the missing number in an array without using any extra spaceEasy
  46. Find maximum length subarray having an equal number of 0’s and 1’sMedium
  47. Find the diameter of a binary treeMedium
  48. Find the maximum product of two integers in an arrayEasy
  49. Longest Palindromic Substring ProblemMedium
  50. Move all zeros present in an array to the endEasy
  51. Print all possible Knight’s tours on a chessboardHard
  52. Search a given key in BSTEasy
  53. Find maximum sum submatrix present in a matrixMedium
  54. Print matrix in spiral orderMedium
  55. Find the size of the largest square submatrix of 1’s present in a binary matrixMedium
  56. Find the Lowest Common Ancestor (LCA) of two nodes in a binary treeMedium
  57. Job Sequencing Problem with DeadlinesMedium
  58. Print all possible solutions to N–Queens problemHard
  59. Rearrange linked list in increasing order (Sort linked list)Medium
  60. Check if a linked list is palindrome or notMedium
  61. In-place merge two sorted arraysMedium
  62. Count occurrences of a number in a sorted array with duplicatesMedium
  63. Find maximum cost path in a graph from a given source to a given destinationMedium
  64. Print top view of a binary treeMedium
  65. Find all possible combinations of words formed from the mobile keypadHard
  66. Check if an undirected graph contains a cycle or notMedium
  67. Find all distinct combinations of a given lengthMedium
  68. Find minimum cost to reach the last cell of a matrix from its first cellMedium
  69. Longest Repeated Subsequence ProblemMedium
  70. Maximum Product Subarray ProblemHard
  71. Compute the least cost path in a weighted digraph using BFSMedium
  72. Find a triplet with the given sum in an arrayMedium
  73. Evaluate a postfix expressionEasy
  74. Shortest Common Supersequence ProblemMedium
  75. Find the path between given vertices in a directed graphEasy
  76. Print left view of a binary treeEasy
  77. Maximum Sum Circular SubarrayHard
  78. Rearrange an array with alternate high and low elementsMedium
  79. Print all distinct subsets of a given setHard
  80. Find maximum profit earned by buying and selling shares any number of timesMedium
  81. Print all combinations of numbers from 1 to n having sum nMedium
  82. Find inorder successor for the given key in a BSTMedium
  83. Find k’th smallest and k’th largest element in a BSTEasy
  84. Find the maximum sum of a subsequence with no adjacent elementsMedium
  85. Right rotate an array k timesEasy
  86. Maximum Subarray Sum using Divide and ConquerMedium
  87. Find ancestors of a given node in a binary treeMedium
  88. Find the number of rotations in a circularly sorted arrayEasy
  89. K–Partition Problem | Printing all partitionsHard
  90. 3–Partition ProblemMedium
  91. Find the peak element in an arrayMedium
  92. 4–Sum Problem | Quadruplets with a given sumMedium
  93. Insert a node to its correct sorted position in a sorted linked listEasy
  94. Print bottom view of a binary treeMedium
  95. Find the minimum number of deletions required to convert a string into a palindromeMedium
  96. Build a binary tree from a parent arrayHard
  97. Wildcard Pattern MatchingHard
  98. Bipartite GraphMedium
  99. Spiral order traversal of a binary treeMedium
  100. Check if a binary tree is a complete binary tree or notMedium

 
Also See:

Top 25 Algorithms Every Programmer Should Know

Top 50 Classic Data Structures Problems

Rate this post

Average rating 4.97/5. Vote count: 58

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Tell us how we can improve this post?


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 :)


guest
1 Comment
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Do NOT follow this link or you will be banned from the site!