Check If All 1's Are at Least Length K Places Away
Check whether every pair of consecutive 1s in a binary array is separated by at least k zeros. The visual marks each gap between ones and its length.
Check whether every pair of consecutive 1s in a binary array is separated by at least k zeros. The visual marks each gap between ones and its length.