One-dimensional Japanese Crossword

Problem Link :

In a nutshell, this problem simply asks you to list down how many lines of black squares, and their lengths.
A simple iteration would do. Just don’t forget to check after the end of iteration if your counter still have some length in them – print them out. Doing so would also take care of a case where there is only one line of black squares.

Leave a Reply

Your email address will not be published. Required fields are marked *