← Questions

Subset sum to a target

0
UberAppleCodingLast asked Jul 2026

A coding interview question asked in Apple's technical phone screen and at Uber, last asked Jul 2026. It tests dynamic programming, knapsack and bitset.

Given a list of positive integers nums and a non-negative integer target, decide whether some subset of nums adds up to exactly target. Each element may be used at most once, though equal values at different positions count as separate…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Apple · Technical phone screen · Last asked Jul 2026
  • Uber · Technical phone screen · Last asked Sep 202560 min · One medium problem with a follow-up, or two short ones; sometimes object-oriented design

What it tests

dynamic programming · knapsack · bitset

Your code and the AI tutor open when you unlock this question.