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
205 questions
- 25Given a collection of rooms where Alibada is in one and moves one room a day to an adjacent room, write a program to determine if you can find Alibada with the given list of rooms.MediumCoding·
Meta - 26Given an array of integers and an integer k, find the kth largest element in the array.MediumCoding·
Meta, Microsoft - 27Given 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 - 28Print all combinations of numbers from 1 to n that sum to n.MediumCoding·
Adobe, Apple - 29Find the container with the maximum volume of water.MediumCoding·
Apple, Goldman Sachs - 30Given a list of conversion items between symbols, write an algorithm to return the conversion ratio for each pair of symbols.HardCodingTechnical·
Snap - 31Count items within compartments between specific indices of an array.MediumCoding·
Amazon - 32Cycle Detection in Package Manager.MediumCoding·
Adobe - 33Implement a hashmap without using any libraries.HardCoding·
Apple, Goldman Sachs - 34Explain how to design and implement a password checker based on specific requirements.MediumCodingTechnical·
Peloton - 35Design an indexer and a retrieverMediumCoding·
Apple - 36Sort a list of natural numbers and their squares in the most efficient way possible.MediumCoding·
Google - 37Explain the differences between stack and heap memory allocation.MediumCoding·
Apple, Microsoft - 38Given an array with objects colored red, white, or blue, sort them so those of the same color are adjacent. Use integers 0, 1, 2 to represent RWB respectively.MediumCoding·
Apple - 39Find the equilibrium index in an array where sum of elements to the left is equal to sum of elements to the right.MediumCoding·
Meta - 40Find the median from a data stream.MediumCoding·
Bloomberg - 41Find the first missing positive number in an array.HardCoding·
Amazon - 42Given a list of strings, find all strings that encode to the same value using a Caesar Cipher. (A Caesar Cipher rotates characters, e.g. in CC3: a->d, b->e, ..., z->c)MediumCoding·
Meta, Pinterest - 43Explain how to find a target sum in an array.MediumCoding·
Adobe, Google - 44Find the DuplicatesEasyCoding·
Adobe, Apple - 45Find a triplet in an array with a given sum.MediumCoding·
Adobe, Goldman Sachs - 46Generate ParenthesesMediumCoding·
Adobe, Google - 47Given n houses in a line with money in each, find the maximum amount a robber can steal, without stealing from two adjacent houses.MediumCoding·
Adobe, Apple - 48Implement a circular buffer.MediumCoding·
Meta