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
1,063 questions
- 817Design and implement an in-memory key-value store that supports set, transactional begin, commit, and abort operations.HardCoding·
OpenAI, xAI - 818Implement the memcpy() function in C.MediumCoding·
Meta - 819Implement merge-sortMediumCoding·
Walmart Labs - 820Implement a phrase search in a list of documents.MediumCoding·
Amazon, Confluent - 821Implement a string sorting algorithm, treating digits as numbers.MediumCoding·
Bolt - 822Implement TrieMediumCoding·
Apple, Goldman Sachs - 823Implement 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 - 824You're given a time-based key-value store that keeps having new key-value pairs added. Implement a windowed average.MediumCoding·
Confluent - 825Sort a nearly sorted (or K sorted) array.MediumCoding·
Google - 826Find the k-th smallest and k-th largest element in a binary search tree (BST).MediumCodingTechnical·
LinkedIn - 827Find the largest perimeter of an island given a two-dimensional array of 1's and 0's representing land and water.MediumCoding·
Bloomberg, Meta - 828PermutationsMediumCoding·
Adobe, Apple - 829Lexicographic Grid Travel.MediumCoding·
Databricks - 830Given 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 - 831Find the longest palindromic subsequence using dynamic programming.MediumCoding·
Adobe, Apple - 832Find the longest substring without repeating characters.MediumCoding·
Apple, Intuit - 833Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding·
Apple, LinkedIn - 834Implement LRU Cache.HardCoding·
Accenture, Adobe - 835A 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 - 836Maximum Number of Visible PointsMediumCoding·
Apple - 837Find the maximum product of any two integers in an array.MediumCoding·
Amazon - 838Maximum ProfitEasyCoding·
Google - 839Find the maximum possible stability of any subset of servers. Return the result modulo 10^9+7. E.g. Consider set of servers where reliability = [1, 2, 2], availability = [1, 1, 3].MediumCoding·
Amazon - 840Find the maximum subarray sum.MediumCoding·
Adobe, Apple