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 1–3
Count how many ways to assign +/− to each element of nums so the signed sum equals target. This reduces to a subset-sum problem: count…
Companies: Meta, Pinterest
0-1 Knapsack · Array · Backtracking · Dynamic Programming
Last reported Nov 2025
Determine whether the array can be partitioned into two subsets with equal sum — equivalently, check if there exists a subset that sums to half…
Companies: Google, Microsoft
0-1 Knapsack · Array · Dynamic Programming · Knapsack Problem
Last reported Dec 2024
Split the stones into two groups to minimize the absolute difference of their total weights — equivalent to finding the largest subset sum ≤ total_sum/2…
Companies: Apple
0-1 Knapsack · Array · Dynamic Programming · Knapsack Problem