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
51 questions
- 25Move all zeros to the end of an array.EasyCoding·
Adobe, Amazon - 26Partition an array into two sub-arrays with equal sum.MediumCoding·
Apple, LinkedIn - 27Sort a binary array in linear time.EasyCoding·
Accenture, Apple - 28Given an integer array nums and an integer k, return true if nums has a subarray of at least two elements whose sum is a multiple of k.HardCoding·
Adobe, Apple - 29Sudoku SolverHardCoding·
Adobe, Apple - 30Calculate the trapped rainwater between bars in a given array.HardCoding·
Adobe, Amazon - 31Given stock prices for the next n days, how can you maximize your profit by buying or selling one share per day?MediumCoding·
Adobe, Apple - 32Calculate the height of a binary tree.EasyCoding·
Apple, Google - 33Build a CalculatorMediumCoding·
Adobe, Apple - 34Determine if an array of integers from 1 to n contains a duplicate in constant time and space.MediumCoding·
Adobe, Apple - 35Edit distanceHardCoding·
Adobe, Amazon - 36Explain the filter function.MediumCoding·
Apple - 37Explain the map function.EasyCoding·
Apple - 38Explain the sort function.EasyCoding·
Apple - 39Find the palindromes.EasyCoding·
Amazon, Apple - 40Find peak element in an arrayEasyCoding·
Apple - 41Given an array, find the two sum.EasyCoding·
Adobe, Amazon - 42Given a string that doesn't fit into a machine's memory, split it at each space and count the number of spaces.MediumCoding·
Apple - 43Implement a doubly linked list.MediumCoding·
Anduril, Apple - 44Implement a red-black tree.HardCoding·
Apple - 45Determine the latency for a hashmap with given data.MediumCoding·
Apple - 46Write a function to return all prime numbers up to a given number n.MediumCoding·
Adobe, Apple - 47Reverse a SentenceEasyCoding·
Adobe, Apple - 48Reverse a linked list.EasyCoding·
Adobe, Apple