Interview questions
Find a company or topic. Read the sources, then practice.
Loading the question library…
Find a company or topic. Read the sources, then practice.
Loading the question library…
Showing 3,351–3,375
Companies: Amazon
Array · Dynamic Programming · Greedy · String
Find a path in an m×n grid with at most one turn whose cell-product has the maximum number of trailing zeros. Reduce each cell to…
General practice
Given a list of time-stamped transactions, produce for each day the maximum transaction amount occurring that day (or, if a window length is specified, the…
General practice
Companies: Paytm
Array · Greedy · Heap (Priority Queue)
Select a non-empty subsequence (you may delete any elements first) whose values are all distinct and maximize its sum — equivalently, pick at most one…
General practice
Given box types with counts and units per box and a truck capacity in number of boxes, select up to truckSize boxes to maximize total…
General practice
Given a string-represented integer n (possibly negative) and a digit x, insert x anywhere (not before a '-') to maximize the numeric value. This is…
General practice
Given n, index, and maxSum, find the largest possible value at nums[index] in a length-n array of positive integers where adjacent elements differ by at…
General practice
Given an array of alphanumeric strings, compute each string's value as its integer value if it contains only digits (leading zeros allowed) or otherwise as…
General practice
Given an array, find the maximum (nums[i] - nums[j]) * nums[k] over all i < j < k (return 0 if all results are negative)…
General practice
Given an array, find the maximum value of (nums[i] - nums[j]) * nums[k] over all ordered triplets i < j < k (return 0 if…
General practice
Pick exactly k coins from n piles where you may only take coins from the top of a pile (i.e., take a prefix of any…
General practice
Select three cells on an m×n board (rooks cannot attack, so all three must have distinct rows and columns) to maximize the sum of their…
General practice
Pick three cells on an m×n integer board so that no two share a row or column and the sum of their values is maximized…
General practice
Each robot can fire once left or right up to its range but the bullet stops at the first robot encountered, so each robot induces…
General practice
Given an array of item weights and two bag capacity limits, assign each item to one of the two bags (or leave it out) to…
General practice
Given a DAG with weighted directed edges and integers k and t, find the maximum total weight strictly less than t of any path that…
General practice
Given non-overlapping intervals of white tiles on a number line and a fixed-length carpet, place the carpet to maximize the total number of covered unit…
General practice
Compute the maximum width across all levels of a binary tree where width counts null gaps as if the tree were a complete binary tree…
General practice