In this post, we have listed out commonly asked interview questions that use sorting:
- Insertion Sort AlgorithmEasy
- Selection Sort AlgorithmEasy
- Bubble Sort AlgorithmEasy
- Merge Sort AlgorithmEasy
- Iterative Merge Sort Algorithm (Bottom-up Merge Sort)Medium
- Quicksort AlgorithmMedium
- Hybrid QuickSort AlgorithmMedium
- Quicksort using Dutch National Flag AlgorithmMedium
- Quicksort algorithm using Hoare’s partitioning schemeMedium
- Counting Sort AlgorithmEasy
- In-place vs out-of-place algorithmsBeginner
- Heap Sort AlgorithmMedium
- Introsort Algorithm – Overview and C++ ImplementationHard
- External Merge Sort AlgorithmHard
- Merge two sorted linked lists from their endMedium
- Merge sort algorithm for a singly linked listHard
- Sort a doubly-linked list using merge sortMedium
- Inversion count of an arrayHard
- Problems solved using partitioning logic of QuicksortEasy
- How to Boost QuickSort Performance?Easy
- Sort elements by their frequency and indexMedium
- Sort an array based on order defined by another arrayMedium
- Efficiently sort an array with many duplicated valuesMedium
- Find the largest number possible from a given set of numbersMedium
- Find surpasser count for each array elementHard
- Segregate positive and negative integers using merge sortMedium
- Find a pair with the given sum in an arrayEasy
- Find the maximum product of two integers in an arrayEasy
- Sort an array of 0’s, 1’s, and 2’s (Dutch National Flag Problem)Medium
- In-place merge two sorted arraysMedium
- Merge two arrays by satisfying given constraintsMedium
- Find all distinct combinations of a given length – IMedium
- Find the smallest window in an array sorting which will make the entire array sortedMedium
- Find minimum platforms needed to avoid delay in the train arrivalMedium
- Sort an array in one swap whose two elements are swappedEasy
- Find a triplet with the given sum in an arrayMedium
- Find pairs with difference
k
in an arrayEasy - 4–Sum Problem | Quadruplets with a given sumMedium
- Print all quadruplets with a given sum | 4 sum problem extendedMedium
- Find two numbers with maximum sum formed by array digitsEasy
- Find a triplet having the maximum product in an arrayMedium
- Find a pair with a minimum absolute sum in an arrayEasy
- Find minimum product among all combinations of triplets in an arrayMedium
- Find all distinct combinations of a given length – IIMedium
- Activity Selection ProblemEasy
- Job Sequencing Problem with DeadlinesMedium
- Water Jugs ProblemHard
- Sort an array using Young tableauHard
- Find all distinct combinations of a given length with repetition allowedMedium
- Print all triplets in an array with a sum less than or equal to a given numberMedium
- Group anagrams together from a list of wordsMedium
- Find minimum operations required to transform a string into another stringHard
- Find all palindromic permutations of a stringMedium
- Iterative approach to finding permutations of a stringHard
- Find all lexicographically next permutations of a string sorted in ascending orderHard
- Find all lexicographic permutations of a stringHard
- Print all distinct subsets of a given setHard
- Merging Overlapping IntervalsMedium
- Maximum Overlapping Intervals ProblemMedium
- Iterative Implementation of QuicksortMedium
- Construct a balanced BST from the given keysEasy
- Find the odd occurring element in an array in logarithmic timeMedium
- Find pairs with difference
k
in an array | Constant Space SolutionMedium - Weighted Interval Scheduling ProblemMedium
- Box Stacking ProblemHard
- Activity Selection Problem using Dynamic ProgrammingMedium
- Weighted Interval Scheduling – Dynamic Programming SolutionMedium
- Longest Increasing Subsequence using LCSMedium
- Kruskal’s Algorithm for finding Minimum Spanning TreeHard
- Merge
M
sorted lists of variable lengthHard - Merge
M
sorted lists each containingN
elementsHard - Lexicographic sorting of a given set of keysMedium
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 :)