Skip to content

dfiedosiuk/nanogram-row

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nanogram row

Program is inspired by nonogram puzzles.

It takes the binary array consisting of only the values 0 and 1. Given a binary array of any length, return an array of positive integers that represent the lengths of the sets of consecutive 1's in the input array, in order from left to right.

For example:

  • [1,1,1,1,1] gives [5]
  • [0,1,1,1,1,1,0,1,1,1,1] gives [5,4]
  • [0,0,0,0,1,1,0,0,1,0,1,1,1] gives [2,1,3]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages