Sorting DSA Problems

464 sorting problems for coding interviews and campus placements, with hints and company tags. Below are the first 100 of 464: 88 easy, 0 medium and 12 hard. Practise them free on InternHack and track what you have solved.

Sorting problems, easiest first

  1. Apple Redistribution into Boxes (Easy)
  2. Array Partition (Easy)
  3. Assign Cookies (Easy)
  4. Average Salary Excluding the Minimum and Maximum Salary (Easy)
  5. Buy Two Chocolates (Easy)
  6. Can Make Arithmetic Progression From Sequence (Easy)
  7. Check if Array is Good (Easy)
  8. Check If N and Its Double Exist (Easy)
  9. Contains Duplicate (Easy)
  10. Count Elements With Strictly Smaller and Greater Elements (Easy)
  11. Count Pairs Whose Sum is Less than Target (Easy)
  12. Coupon Code Validator (Easy)
  13. Delete Greatest Value in Each Row (Easy)
  14. Divide an Array Into Subarrays With Minimum Cost I (Easy)
  15. Fair Candy Swap (Easy)
  16. Find Missing Elements (Easy)
  17. Find Resultant Array After Removing Anagrams (Easy)
  18. Find Subsequence of Length K With the Largest Sum (Easy)
  19. Find Target Indices After Sorting Array (Easy)
  20. Find the Difference (Easy)
  21. Find the Distance Value Between Two Arrays (Easy)
  22. Finding 3-Digit Even Numbers (Easy)
  23. Height Checker (Easy)
  24. High Five (Easy)
  25. How Many Apples Can You Put into the Basket (Easy)
  26. How Many Numbers Are Smaller Than the Current Number (Easy)
  27. Index Pairs of a String (Easy)
  28. Intersection of Multiple Arrays (Easy)
  29. Intersection of Two Arrays (Easy)
  30. Intersection of Two Arrays II (Easy)
  31. Keep Multiplying Found Values by Two (Easy)
  32. Largest Number After Digit Swaps by Parity (Easy)
  33. Largest Number At Least Twice of Others (Easy)
  34. Largest Perimeter Triangle (Easy)
  35. Largest Positive Integer That Exists With Its Negative (Easy)
  36. Largest Unique Number (Easy)
  37. Longest Harmonious Subsequence (Easy)
  38. Longest Subsequence With Limited Sum (Easy)
  39. Majority Element (Easy)
  40. Make Array Zero by Subtracting Equal Amounts (Easy)
  41. Make Two Arrays Equal by Reversing Subarrays (Easy)
  42. Matrix Cells in Distance Order (Easy)
  43. Maximize Sum Of Array After K Negations (Easy)
  44. Maximum Product Difference Between Two Pairs (Easy)
  45. Maximum Product of Three Numbers (Easy)
  46. Maximum Product of Two Digits (Easy)
  47. Maximum Product of Two Elements in an Array (Easy)
  48. Maximum Units on a Truck (Easy)
  49. Mean of Array After Removing Some Elements (Easy)
  50. Meeting Rooms (Easy)
  51. Merge Similar Items (Easy)
  52. Merge Sorted Array (Easy)
  53. Minimum Absolute Difference (Easy)
  54. Minimum Amount of Time to Fill Cups (Easy)
  55. Minimum Average of Smallest and Largest Elements (Easy)
  56. Minimum Cost of Buying Candies With Discount (Easy)
  57. Minimum Deletions for At Most K Distinct Characters (Easy)
  58. Minimum Difference Between Highest and Lowest of K Scores (Easy)
  59. Minimum Number Game (Easy)
  60. Minimum Number of Moves to Seat Everyone (Easy)
  61. Minimum Subsequence in Non-Increasing Order (Easy)
  62. Minimum Sum of Four Digit Number After Splitting Digits (Easy)
  63. Missing Number (Easy)
  64. Number of Distinct Averages (Easy)
  65. Number of Unequal Triplets in Array (Easy)
  66. Rank Transform of an Array (Easy)
  67. Relative Ranks (Easy)
  68. Relative Sort Array (Easy)
  69. Set Mismatch (Easy)
  70. Smallest Missing Integer Greater Than Sequential Prefix Sum (Easy)
  71. Sort Array By Absolute Value (Easy)
  72. Sort Array by Increasing Frequency (Easy)
  73. Sort Array By Parity (Easy)
  74. Sort Array By Parity II (Easy)
  75. Sort Even and Odd Indices Independently (Easy)
  76. Sort Integers by The Number of 1 Bits (Easy)
  77. Sort the People (Easy)
  78. Sorting the Sentence (Easy)
  79. Special Array With X Elements Greater Than or Equal X (Easy)
  80. Split With Minimum Sum (Easy)
  81. Squares of a Sorted Array (Easy)
  82. The K Weakest Rows in a Matrix (Easy)
  83. Third Maximum Number (Easy)
  84. Transform Array by Parity (Easy)
  85. Two Sum Less Than K (Easy)
  86. Type of Triangle (Easy)
  87. Valid Anagram (Easy)
  88. Widest Vertical Area Between Two Points Containing No Points (Easy)
  89. Allocate Mailboxes (Hard)
  90. Apply Operations to Maximize Frequency Score (Hard)
  91. Apply Operations to Maximize Score (Hard)
  92. Best Meeting Point (Hard)
  93. Brace Expansion II (Hard)
  94. Check If String Is Transformable With Substring Sort Operations (Hard)
  95. Checking Existence of Edge Length Limited Paths (Hard)
  96. Checking Existence of Edge Length Limited Paths II (Hard)
  97. Closest Room (Hard)
  98. Closest Subsequence Sum (Hard)
  99. Concatenated Words (Hard)
  100. Contains Duplicate III (Hard)

Companies that ask sorting problems

Before your interview

Most resumes are filtered by software before a recruiter reads them. Check your resume ATS score free, no signup needed.

Other DSA topics