Algorithm problems from coding interviews. Practice explaining your approach, its complexity and the edge cases before you write code.
Showing 10 of 112 questions
Searching for the Successor in a Binary Search Tree
Medium
algorithms
Uber
You have a knapsack with a maximum capacity of C, and there are n items available, each with a weight of w[i] and a value of v[i]. The goal is to maximize the total value in the knapsack without surpassing its maximum capacity.
Medium
algorithms
Apple
Determine the minimum distance between two points.
Medium
algorithms
Meta (Facebook)
Determine the maximum perimeter of an island using a two-dimensional array where 1’s represent land and 0’s represent water.
Medium
algorithms
Meta (Facebook)
Given a collection of integers that depict an elevation map, determine the volume of water that the area can retain following rainfall.
Medium
algorithms
Microsoft
Check if an array containing numbers from 1 to n has any duplicates, using constant time and space.
Medium
algorithms
Meta (Facebook)
Given an array of numbers representing the heights of buildings from a beach, return an array that includes the heights of the buildings that have a view of the beach.
Medium
algorithms
Amazon
For a given array, output the Next Greater Element (NGE) for each element. The NGE for an element x is defined as the first element to the right of x in the array that is greater than x. If there is no greater element available, treat the NGE as -1.
Medium
algorithms
Flatiron Health, Uber
Create a JavaScript Promise.all() function.
Medium
algorithms
Apple
tic tac toe final matches
Medium
algorithms
Product
Audiences
Job Search Guides
© 2026 Prepin LLC · Philadelphia, PA · All rights reserved.