← Oracle questions

Maximum sum of elements where picking value i prevents selecting i+1 or i-1

Filed under Oracle

Given an array of integers, find the maximum possible sum of a subset where selecting an element with value i prevents selecting any element with value i+1 or i-1 (similar to House Robber or Delete…

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 Oracle questions

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