Top 50
Topic roadmap
Updated weekly · Last refresh Nov 5

Top 50 top k Interview Questions

The most frequently asked top k questions across all roles and companies, ranked by real interview frequency. Updated daily.

50questions
~12htotal time
68companies covered
Track your progressSign up free to work through all 50 questions and resume where you left off.
Start practicing free →
1
CodingStart here. 43 questions · ~629 min
Top K Frequent ElementsEasy
Practice
Recently asked

Find the k most frequent elements in an array using counting and a heap or bucket strategy.

Hash Tablestop kHeapAllegis GroupDelta Electronics AmericasAccenture
Top K Elements With HeapMedium
Practice
Recently asked

Return the k largest array elements in descending order using a size-k min-heap.

ArraysData StructuresAlgorithmsHHackerRank
Kth Largest Without SortingMedium
Practice
Recently asked

Use in-place Quickselect to find the kth largest array element without sorting the full input.

Arraystop kHeapTencentNew Relic
Top K Nearest DistancesMedium
Practice
Recently asked

Use a size-k heap to return the indices of the k smallest distances with deterministic tie-breaking.

Arraystop kHeapInfosys
Top K Frequent ItemsMedium
Practice

Track the k most frequent items from a stream using a hash map and heap.

coding challengefrequency countData StructuresSScale.ai
Top-K Frequent Errors Data StructureHard
Practice
Recently asked

Track message frequencies and return the top K errors using a bounded min-heap with deterministic lexicographic tie-breaking.

aggregationData StructuresAlgorithmsSAP
More Coding questions with a free account
2
SQL & Data Manipulation3 questions + 1 drill · ~54 min
SQL for Top CategoriesMedium
Practice

Aggregate sales by category and return the three highest-performing categories.

Joinssql queryGroup ByGGrafton ApparelGGhanda Clothing11 Stop HR
SQL Top 10% by EngagementMedium
Practice
Recently asked

Rank Facebook users by total session duration and return the top 10% using aggregation and NTILE.

Rankingtop kFacebookActivisionAppsFlyer
Unique Elements and Top-K FrequenciesMedium
Practice
Recently asked
Practice drill

Return the first row for each unique value, then rank the k most frequent values.

large datasetsData Structurescomplex queriesEverlaw
More SQL & Data Manipulation questions with a free account

Sign up to see every question

Create a free account to unlock this list and practice real interview questions.

Get my prep plan
3
System Design3 questions · ~44 min
More System Design questions with a free account
4
More topics1 question · ~15 min
More questions with a free account
The finish line: interview-readyComplete all 50 questions plus 1 hands-on drill to finish this plan.