Top 50 Sorting Interview Questions
The most frequently asked Sorting questions across all roles and companies, ranked by real interview frequency. Updated daily.
Merge two sorted arrays into one sorted array using a two-pointer linear scan.
Dropbox
TetraScience
BookingUse a hash map to find two array elements that sum to a target in O(n) time.
EtsyLLuxoft Singapore
NeoDoctoMerge two sorted singly linked lists into one sorted list by relinking existing nodes.
Expedia Group
NeoDocto
OtterImplement an LRU cache using a hash map and doubly linked list to support O(1) get and put operations.
WorldQuant
Scout Motors
TwitchSort intervals by start time, then merge overlapping ranges into a minimal non-overlapping list.
Anthropic
Justworks
XeroSort an integer array in ascending order and return the sorted result.
Bread Financial
TATA ELXSI
OracleImplement merge sort in Python and explain why it runs in O(n log n) time.
Trend Micro
Kanini
DataEconomySign up to see every question
Create a free account to unlock this list and practice real interview questions.
Find the second highest distinct salary from a single table using basic PostgreSQL ordering and limiting.
eClinicalWorksNNeenOpal Canada
InformaticaReturn the 10 highest-GPA students with deterministic ordering and null GPA exclusion.
University of Utah
Syracuse UniversityReturn the 10 most-viewed active California physician profiles using WHERE, ORDER BY, and LIMIT.
Doximity