← ALL NOTES
Array

3354. Make Array Elements Equal to Zero

Given an array nums of non-negative numbers. Choose a starting position with a zero and a direction (left/right). The cursor moves: on a zero it continues in the current direction; on a positive…

Loading…