Sorting interview questions
Practice 23 questions on sorting. Each runs in a real in-browser editor with Jest tests and a worked, diagram-backed solution.
23 questions
- AlgorithmsCoding exercise
Bubble Sort
EASYImplement bubble sort, repeatedly swapping adjacent out-of-order pairs until the array is sorted.
15 minPractice - AlgorithmsCoding exercise
Combine Two Sorted Linked Lists
EASYImplement a function that merges two sorted linked lists into a single sorted linked list.
15 minPractice - AlgorithmsCoding exercise
Insertion Sort
EASYImplement insertion sort by building the sorted portion one element at a time from the input.
15 minPractice - AlgorithmsCoding exercise
Meeting Calendar
EASYImplement a function that determines whether a person can attend every meeting given their time intervals.
15 minPractice - AlgorithmsCoding exercise
Selection Sort
EASYImplement selection sort to order an array by repeatedly picking the smallest remaining element.
15 minPractice - AlgorithmsCoding exercise
Counting / Radix Sort
MEDIUMSort integers without comparisons — counting sort tallies occurrences into buckets, and radix sort applies it digit by digit from the least significant.
25 minPremium questionPractice - UI / FrameworksUI challenge4 variants
Data Table II
MEDIUMBuild a users data table that lets you sort by any column in ascending or descending order.
25 minPremium questionAmazon · Palantir · StripePractice - AlgorithmsCoding exercise
Disjoint Intervals
MEDIUMImplement a function that returns the minimum number of intervals to remove so the remaining ones do not overlap.
25 minPractice - AlgorithmsCoding exercise
Merge New Interval
MEDIUMImplement a function that inserts a new interval into a sorted list and merges any resulting overlaps.
25 minPractice - AlgorithmsCoding exercise
Merge Overlapping Intervals
MEDIUMImplement a function that merges all overlapping intervals in a list and returns the consolidated set in sorted order.
25 minPractice - AlgorithmsCoding exercise
Merge Sort
MEDIUMImplement merge sort recursively by splitting the array and merging the sorted halves back together.
25 minPractice - JavaScriptCoding exercise
Mini Object-relational Mapper II
MEDIUMExtend a simplified in-memory ORM with richer filtering predicates and multi-field sorting.
25 minPremium questionOpenAIPractice - AlgorithmsCoding exercise
Minimum Meeting Rooms Needed
MEDIUMImplement a function that returns the fewest meeting rooms required to host a list of time intervals without conflicts.
25 minPractice - JavaScriptCoding exercise
orderBy
MEDIUMImplement orderBy — stably sort objects by multiple keys, each ascending or descending.
25 minPractice - AlgorithmsCoding exercise
Quick Sort
MEDIUMImplement quick sort recursively, partitioning around a pivot and sorting each side independently.
25 minPractice - AlgorithmsCoding exercise
Reading Order
MEDIUMImplement a function that sorts positioned canvas elements into natural left-to-right, top-to-bottom reading order.
25 minFigmaPractice - AlgorithmsCoding exercise
Reading Order II
MEDIUMImplement a function that groups misaligned 2D canvas elements into rows, then sorts them into a natural reading order.
25 minPremium questionFigmaPractice - AlgorithmsCoding exercise
Triplet Sum
MEDIUMImplement a function that returns every unique triplet of distinct indices whose values sum to zero.
25 minPractice - UI / FrameworksUI challenge4 variants
Data Table III
HARDBuild a generic, reusable data table that supports column-driven sorting and pagination for any dataset.
40 minAmazon · Palantir · StripePractice - UI / FrameworksUI challenge4 variants
Data Table IV
HARDBuild a generalized data table component that supports pagination, column sorting, and per-column filtering.
40 minAmazon · Databricks · Palantir +7Practice - UI / FrameworksUI challenge4 variants
Data Table V
HARDBuild a data table with sortable columns, pagination, and row selection over a dataset.
40 minPremium questionPractice - AlgorithmsCoding exercise
Heap Sort
HARDImplement heap sort by building a max-heap and repeatedly extracting the largest element.
40 minPremium questionPractice - AlgorithmsCoding exercise
Topological Sort
HARDImplement a function that returns a topological ordering of nodes in a directed acyclic graph.
40 minPremium questionSnapPractice