Sorting Interview Questions and Practice Problems

 
 
In this post, we have list out 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. Quicksort Algorithm
     
  7. Iterative Implementation of Quicksort
     
  8. Hybrid QuickSort
     
  9. Quicksort using Dutch National Flag Algorithm
     
  10. Quick Sort using Hoare’s Partitioning scheme
     
  11. External merge sort
     
  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. Efficiently Sort an Array with many Duplicated Values
     
  18. Find the smallest window in array sorting which will make the entire array sorted
     
  19. Find largest number possible from set of given numbers
     
  20. Move all zeros present in the array to the end
     
  21. Sort binary array in linear time
     
  22. Sort linked list containing 0’s, 1’s and 2’s
     
  23. Merge Sort Algorithm for Singly Linked List
     
  24. Group anagrams together from given list of words
     
  25. Activity Selection Problem
     
  26. Lexicographic sorting of given set of keys
     
  27. Heap Sort Algorithm
     
  28. Merge M sorted lists of variable length
     
  29. Merge M sorted lists each containing N elements
     
  30. Find all palindromic permutations of a string
     
  31. Find all lexicographically next permutations of a string sorted in ascending order
     
  32. Merge two sorted linked lists from their end
     
  33. Sort an array containing 0’s, 1’s and 2’s (Dutch national flag problem)
     
  34. Find pair with given sum in the array
     
  35. Inplace merge two sorted arrays
     
  36. Merge two arrays by satisfying given constraints
     
  37. Find maximum product of two integers in an array
     
  38. Find all distinct combinations of given length
     
  39. Find all distinct combinations of given length with repetition allowed
     
  40. Merging Overlapping Intervals
     
  41. Print all quadruplets with given sum | 4-sum problem extended
     
  42. 4 sum problem | Quadruplets with given sum
     
  43. Find two numbers with maximum sum formed by array digits
     
  44. Find a Triplet having Maximum Product in an Array
     
  45. Find Minimum Product among all Combinations of Triplets in an Array
     
  46. Find all distinct combinations of given length
     
  47. Find the surpasser count for each element of an array
     

 
 

Thank you for being with us. 🙂

 


Leave a Reply

avatar
  Subscribe  
Notify of