โ† DE Shaw questions
CodingHardReported in a candidate post, Aug 2020

Minimum Cost to Convert Array to Ones

Filed under DE Shaw

The question

Given binary array A and cost array B, convert all elements of A to 1 with minimum cost. Converting A[i] from 0 to 1 costs B[i], but if A[i-1] and A[i+1] are both 1, converting A[i] costs 0.

No write-up yet. Related questions below have one.

Related DE Shaw questions

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