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
- 121Subarray Sum Equals KMediumCoding·
Amazon - 122Subarray Sums Divisible by KMediumCoding·
Amazon - 123Sum of Beauty in the ArrayMediumCoding·
ServiceNow - 124Sum of DistancesMediumCoding·
Sprinklr - 125Sum of Two IntegersMediumCoding·
BloomBerg - 126Sum Root to Leaf NumbersMediumCoding·
BitGo, Meta - 127Swapping Nodes in a Linked ListMediumCoding·
ServiceNow - 128The k-th Lexicographical String of All Happy Strings of Length nMediumCoding· TSTechMojo Solutions
- 129Ugly Number IIIMediumCoding·
Media.net - 130Valid SudokuMediumCoding·
PayPal - 131Word FrequencyMediumCoding·
NetApp - 132Course ScheduleMediumCoding·
Zoho - 133Validate IP AddressMediumCoding·
Salesforce - 13401 Matrix: find the nearest zero for every cellMediumCoding·
Adobe, Oracle - 135Given 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 - 136Write a function to balance parentheses in a given string by removing the fewest characters possible. Ensure that each opening parenthesis has a corresponding closing parenthesis and each pair is properly nested.MediumCoding·
Meta - 137Given a string with parentheses, write a function that removes the minimum number of characters to balance the parentheses.MediumCoding·
Meta - 138Balanced TreeMediumCoding·
Spotify, Uber - 139Given a list of items with different sizes, write an algorithm to pack these items into the minimum number of batches without exceeding the capacity of each batch.MediumCoding·
Amazon - 140Given a binary tree, check if each node is the average of all descendantsMediumCoding·
Meta - 141Given the root of a binary tree, return the length of the diameter of the tree.MediumCoding·
Amazon, Google - 142Given the root of a binary tree of integers, return the maximum path sum.MediumCoding·
Adobe, Apple - 143Build a hit counter that tracks the number of hits in the last 5 minutes, supporting multiple keys (e.g., “a”, “b”). Then, use this counter to implement a simple rate limiter.MediumCoding·
Uber - 144Given a list with response time for each server, calculate how long time it will take to process n requests.MediumCoding·
Google