← ALL NOTES
String

3499. Maximize Active Section with Trade I

Given a binary string s of length n: '1' is an active section, '0' inactive. You may do at most one trade: (1) pick a contiguous block of '1's surrounded by zeros and zero it; (2) then pick a…

Loading…