Sorting Interview Questions | Practice Problems

Below is the list of commonly asked interview questions that uses sorting –


  1. Insertion sort | Iterative & Recursive
  2. Selection sort | Iterative & Recursive
  3. Bubble sort | Iterative & Recursive
  4. Merge Sort Algorithm
  5. Iterative Merge Sort Algorithm (Bottom-up Merge Sort)
  6. External merge sort
  7. Quicksort Algorithm
  8. Iterative Implementation of Quicksort
  9. Hybrid QuickSort
  10. Quicksort using Dutch National Flag Algorithm
  11. Quick Sort using Hoare’s Partitioning scheme
  12. Counting Sort Algorithm
  13. Custom Sort | Sort elements by their frequency and Index
  14. Custom Sort | Sort elements of the array by order of elements defined by the second array
  15. Inversion Count of an array
  16. Segregate positive and negative integers in linear time
  17. Find the smallest window in array sorting which will make the entire array sorted
  18. Find largest number possible from set of given numbers
  19. Move all zeros present in the array to the end
  20. Sort binary array in linear time
  21. Sort linked list containing 0’s, 1’s and 2’s
  22. Merge Sort Algorithm for Singly Linked List
  23. Group anagrams together from given list of words
  24. Activity Selection Problem
  25. Lexicographic sorting of given set of keys
  26. Heap Sort (Out-of-place and In-place implementation in C++ and C)
  27. Merge M sorted lists of variable length
  28. Merge M sorted lists each containing N elements
  29. Find all palindromic permutations of a string
  30. Find all lexicographically next permutations of a string sorted in ascending order
  31. Merge two sorted linked lists from their end
  32. Sort an array containing 0’s, 1’s and 2’s (Dutch national flag problem)
  33. Find pair with given sum in the array
  34. Inplace merge two sorted arrays
  35. Merge two arrays by satisfying given constraints
  36. Find maximum product of two integers in an array
  37. Find all distinct combinations of given length
  38. Find all distinct combinations of given length with repetition allowed
  39. Merging Overlapping Intervals
  40. Print all quadruplets with given sum | 4-sum problem extended
  41. 4 sum problem | Quadruplets with given sum
  42. Efficiently Sort an Array with many Duplicated Values


Thank you for being with us. 🙂


Leave a Reply

Notify of