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
28 questions
- 1Asteroid CollisionMediumCoding·
Amazon, Microsoft - 2Koko eating bananas.MediumCoding·
Flipkart, Amazon - 3Top k frequent elementsMediumCoding·
Amazon, Apple - 4Extra Characters in a StringMediumCoding·
Microsoft - 5Find the Winner of an Array GameMediumCoding·
Microsoft - 6Largest NumberMediumCoding·
Microsoft - 7Longest Consecutive SequenceMediumCoding·
Amazon, Microsoft - 8Most Profit Assigning WorkMediumCoding·
Microsoft - 9Product of Array Except SelfMediumCoding·
PayPal, Target - 10Reorder ListMediumCoding·
Microsoft - 11Given an array of integers and an integer k, find the kth largest element in the array.MediumCoding·
Meta, Microsoft - 12Given two empty jugs with capacities a and b liters and an infinite water supply, determine a way to end up with exactly X liters of water.MediumCoding·
Microsoft - 13Delete Node in a Binary Search Tree (BST).MediumCoding·
Microsoft - 14Explain the differences between an interface and an abstract class.MediumCodingTechnical·
Goldman Sachs, Microsoft - 15Explain the differences between stack and heap memory allocation.MediumCoding·
Apple, Microsoft - 16Find the longest substring without repeating characters.MediumCoding·
Apple, Intuit - 17Print all words from a dictionary that can be found on a given Boggle board.MediumCoding·
Microsoft - 18How would you store a list of numbers as a single number?MediumCodingTechnical·
Atlassian, Microsoft - 19Given a list of sentences, find the top n most frequent words.MediumCoding·
Microsoft - 20Determine if an array of integers from 1 to n contains a duplicate in constant time and space.MediumCoding·
Adobe, Apple - 21Given an array of integers, return the pairs with the minimum absolute difference between them.MediumCoding·
Microsoft - 22Given an integer, reverse it. Integers are within range [-2^15, 2^15 - 1].MediumCoding·
Microsoft - 23Construct a binary tree given its preorder and inorder traversals.MediumCoding·
Adobe, Amazon - 24Design LFU cache.MediumCodingSystem design·
Microsoft