← Microsoft questions

Find combinations from a sorted array that add up to N

Filed under Microsoft

Given a target number N and a sorted array of positive integers A, find all unique combinations of elements from A that add up to N. The same element from A may be chosen an unlimited number of times.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.