← Microsoft questions

Maximum subset-sum with consecutive element constraints

Filed under Microsoft

Given an array of integers, find the maximum subset sum such that for every pair of consecutive elements in the original array, at least one of them is included in the subset.

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.