</>OfferRetriever
DashboardDiscuss
NEW

Spring Hire Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

08

:

04

:

55

:

17

Get this deal
Back to Dashboard

[CodeSignal] Leftmost Zero Filler

Medium

You are given a binary array slots containing only 0s and 1s, and an array of string commands ops. Apply each command in order:

  • Command "1": Find the leftmost 0 in slots and set it to 1. If no 0 exists, do nothing. ...