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 51–62
Partition the ordered list of jobs into d contiguous days (at least one job per day) to minimize the sum of daily difficulties, where each…
Companies: Atlassian, Microsoft
Array · Dynamic Programming
Given a target distance, initial fuel, and stations at positions with fuel amounts, determine the minimum number of refueling stops needed to reach the target…
Companies: D. E. Shaw, Uber, Waymo
Array · Dynamic Programming · Greedy · Heap (Priority Queue)
Given n, you may add or subtract any power of two per operation; find the minimum number of such operations to reach 0. The core…
Companies: Salesforce, Uber
Bit Manipulation · Dynamic Programming · Greedy
Partition the string into the fewest contiguous substrings such that each substring is "balanced" (every distinct character in the substring appears the same number of…
Companies: Grammarly
Counting · Dynamic Programming · Hash Table · String
Count the number of ways to form target left-to-right by picking each target character from some word’s character at column k, with the constraint that…
Companies: Uber
Array · Dynamic Programming · String
Count the number of ways to assign distinct hats (labels 1..40) to n ≤ 10 people given each person's allowed hat list, returning the answer…
Companies: Roblox
Array · Bipartite Graph · Bit Manipulation · Bitmask
Partition the input string s into substrings so that every substring is a palindrome, and return all possible such partitions. This is typically solved by…
Companies: Salesforce
Backtracking · Dynamic Programming · String
Partition the array into contiguous subarrays of length at most k, replace every value in a subarray with that subarray's maximum, and maximize the resulting…
Companies: TikTok
Array · Dynamic Programming
Partition the 2n integers into two equal-sized groups (choose n elements for one group) to minimize the absolute difference of their sums — a constrained…
Companies: Salesforce
Array · Binary Search · Bit Manipulation · Bitmask
Generate the first numRows of Pascal's Triangle as a list of lists, where each row starts and ends with 1 and every interior element equals…
Companies: Bloomberg
Array · Dynamic Programming
Given a line of dominoes where some are initially pushed left (L), right (R), or upright (.), compute the final positions after simultaneous propagation of…
Companies: Anduril
Dynamic Programming · String · Two Pointers
Given up to 16 required skills and up to 60 people each with some skills, find the smallest set of people whose combined skills cover…
Companies: Airbnb
Array · Bit Manipulation · Bitmask · Dynamic Programming