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
32 questions
- 1Climbing StairsEasyCoding·
Media.net - 2Merge IntervalsMediumCoding·
Blinkit, Docquity Holdings(PBS) - 3Given a list of car rental requests with start and end times, assign cars to rentals such that the total number of cars used is minimized.MediumCoding·
Google - 4Given the root of a binary tree, return the length of the diameter of the tree.MediumCoding·
Amazon, Google - 5Sort a list of natural numbers and their squares in the most efficient way possible.MediumCoding·
Google - 6Explain how to find a target sum in an array.MediumCoding·
Adobe, Google - 7Generate ParenthesesMediumCoding·
Adobe, Google - 8Sort a nearly sorted (or K sorted) array.MediumCoding·
Google - 9PermutationsMediumCoding·
Adobe, Apple - 10Find the longest palindromic subsequence using dynamic programming.MediumCoding·
Adobe, Apple - 11Maximum ProfitEasyCoding·
Google - 12Find the maximum subarray sum.MediumCoding·
Adobe, Apple - 13Merge k sorted linked lists.HardCoding·
Adobe, Apple - 14Given a large n-ary tree where the root node can pass information to one child per iteration, and in subsequent iterations, nodes can pass information to one child while the root continues with others, find the minimum number of iterations to reach all nodes.MediumCoding·
Google - 15Given a matrix with a rat, bread, cat, and obstacles, find a path from the rat to the bread that maximizes the minimum distance from cat.HardCoding·
Google - 16Write functions to serialize and deserialize a list of strings.MediumCoding·
Google, Nvidia - 17Sort a binary array in linear time.EasyCoding·
Accenture, Apple - 18Given 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 - 19Calculate the height of a binary tree.EasyCoding·
Apple, Google - 20Construct a binary tree given its preorder and inorder traversals.MediumCoding·
Adobe, Amazon - 21Count the number of ways to split a string.EasyCoding·
Google - 22Degrees of FriendshipEasyCoding·
Google - 23Design a task scheduler in Python.MediumCoding·
Google, OpenAI - 24Determine if a given binary tree is a binary search tree (BST).MediumCoding·
Adobe, Google