Uber logoUber
Coding·90 minMembers

OA: Maximum Items by Budget with Prefix Sums

Members only

Hack2Hire OA problem. Stalls have non-decreasing prices. For each query `(pos, amount)`, starting from stall `pos`, buy at most one item per stall while moving right; maximize the number of items boug...

SWE
array
two-pointer
easy
Frequency
Low
Last asked
2026-02-11
Stage
oa

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...