Question bank
4,310 interview questions, answered.
Reference answers, what the interviewer is really testing, how it is graded, and the follow-ups that come next.
Easy 190Medium 2,498Hard 982
Filters · onDifficulty, topic, company
36 questions
- 1Koko eating bananas.MediumCoding·
Flipkart, Amazon - 2Merge IntervalsMediumCoding·
Blinkit, Docquity Holdings(PBS) - 3Top k frequent elementsMediumCoding·
Amazon, Apple - 4Product of Array Except SelfMediumCoding·
PayPal, Target - 5Course ScheduleMediumCoding·
Zoho - 6Given a list of items with different sizes, write an algorithm to pack these items into the minimum number of batches without exceeding the capacity of each batch.MediumCoding·
Amazon - 7Given the root of a binary tree, return the length of the diameter of the tree.MediumCoding·
Amazon, Google - 8Count items within compartments between specific indices of an array.MediumCoding·
Amazon - 9Find the first missing positive number in an array.HardCoding·
Amazon - 10Implement file searchMediumCoding·
Amazon - 11Implement a phrase search in a list of documents.MediumCoding·
Amazon, Confluent - 12Implement LRU Cache.HardCoding·
Accenture, Adobe - 13Find the maximum product of any two integers in an array.MediumCoding·
Amazon - 14Most Common WordsEasyCoding·
Amazon - 15Move all zeros to the end of an array.EasyCoding·
Adobe, Amazon - 16How do you split a machine learning dataset for training, evaluation, and testing?MediumCoding·
Amazon - 17Get the top API users based on transaction logs.MediumCoding·
Amazon - 18Print the top view of nodes in a binary tree.MediumCoding·
Amazon - 19Calculate the trapped rainwater between bars in a given array.HardCoding·
Adobe, Amazon - 20Find all permutations of a given string.MediumCoding·
Amazon - 21Construct a binary tree given its preorder and inorder traversals.MediumCoding·
Adobe, Amazon - 22Detect cycle in graphMediumCoding·
Amazon - 23How can you tell if a graph is not a tree?MediumCodingTechnical·
Amazon - 24Edit distanceHardCoding·
Adobe, Amazon