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
- 49Implement file searchMediumCoding·
Amazon - 50Implement the memcpy() function in C.MediumCoding·
Meta - 51Implement merge-sortMediumCoding·
Walmart Labs - 52Implement a phrase search in a list of documents.MediumCoding·
Amazon, Confluent - 53Implement a string sorting algorithm, treating digits as numbers.MediumCoding·
Bolt - 54Implement TrieMediumCoding·
Apple, Goldman Sachs - 55Implement wildcard pattern matching for a string (s) and a pattern (p) with '?' and '*' in a way that covers the entire input string.MediumCoding·
Service Now - 56You're given a time-based key-value store that keeps having new key-value pairs added. Implement a windowed average.MediumCoding·
Confluent - 57Sort a nearly sorted (or K sorted) array.MediumCoding·
Google - 58Find the k-th smallest and k-th largest element in a binary search tree (BST).MediumCodingTechnical·
LinkedIn - 59Find the largest perimeter of an island given a two-dimensional array of 1's and 0's representing land and water.MediumCoding·
Bloomberg, Meta - 60PermutationsMediumCoding·
Adobe, Apple - 61Lexicographic Grid Travel.MediumCoding·
Databricks - 62Given an array of integers and a number N, find the length of the longest contiguous subarray such that the difference between any two elements in the subarray is less than N.MediumCoding·
Uber - 63Find the longest palindromic subsequence using dynamic programming.MediumCoding·
Adobe, Apple - 64Find the longest substring without repeating characters.MediumCoding·
Apple, Intuit - 65Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding·
Apple, LinkedIn - 66Implement LRU Cache.HardCoding·
Accenture, Adobe - 67A knapsack has a maximum capacity C and there are n items each with weight w[i] and value v[i]. Maximize the knapsack value without exceeding capacity.MediumCodingTechnical·
Uber - 68Maximum Number of Visible PointsMediumCoding·
Apple - 69Find the maximum product of any two integers in an array.MediumCoding·
Amazon - 70Maximum ProfitEasyCoding·
Google - 71Find the maximum subarray sum.MediumCoding·
Adobe, Apple - 72Merge k sorted linked lists.HardCoding·
Adobe, Apple