JavaScript Challenge: Bitmap Holes

Поділитися
Вставка
  • Опубліковано 1 лип 2024
  • Have the function bitmapHoles take the array of strings stored in strArr, which will be a 2-D matrix of 0s and 1s, and determine how many holes, or contiguous regions of 0s, exist in the matrix. A contiguous region is one in which there are connected groups of 0s going in one or more of four directions: up, down, left, or right. For example: if strArr is ["101111","101101","111010","001010"], then there are five holes.
  • Навчання та стиль

КОМЕНТАРІ •