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
343 questions
- 169Given 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 - 170Explain how to find a target sum in an array.MediumCoding·
Adobe, Google - 171Find a triplet in an array with a given sum.MediumCoding·
Adobe, Goldman Sachs - 172Given an array of numbers where every number occurs twice except one, how would you find the unique number in O(log n) time?MediumCoding·
Meta - 173Generate ParenthesesMediumCoding·
Adobe, Google - 174Given 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 - 175Implement a circular buffer.MediumCoding·
Meta - 176Implement file searchMediumCoding·
Amazon - 177Implement the memcpy() function in C.MediumCoding·
Meta - 178Implement merge-sortMediumCoding·
Walmart Labs - 179Implement a phrase search in a list of documents.MediumCoding·
Amazon, Confluent - 180Implement a string sorting algorithm, treating digits as numbers.MediumCoding·
Bolt - 181Implement TrieMediumCoding·
Apple, Goldman Sachs - 182Implement 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 - 183You're given a time-based key-value store that keeps having new key-value pairs added. Implement a windowed average.MediumCoding·
Confluent - 184Sort a nearly sorted (or K sorted) array.MediumCoding·
Google - 185Find the k-th smallest and k-th largest element in a binary search tree (BST).MediumCodingTechnical·
LinkedIn - 186Find the largest perimeter of an island given a two-dimensional array of 1's and 0's representing land and water.MediumCoding·
Bloomberg, Meta - 187PermutationsMediumCoding·
Adobe, Apple - 188Lexicographic Grid Travel.MediumCoding·
Databricks - 189Given 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 - 190Find the longest palindromic subsequence using dynamic programming.MediumCoding·
Adobe, Apple - 191Find the longest substring without repeating characters.MediumCoding·
Apple, Intuit - 192Find the lowest common ancestor (LCA) of two nodes in a binary tree.MediumCoding·
Apple, LinkedIn