
Nonogram Encode
I believe you love the picture logic puzzles called nonograms and have solved many of them. This mission is the opposite: you already have a binary image, formed by strings of equal length, where a background empty cell contains whitespace and a picture cell contains 'X'.
Your goal is to create a nonogram based upon the image: write number clues for solving the image like it was hidden. Your function
should return a list of two lists. The first one consists of
lists with numbers for the columns' clues and the second one
contains the same for the rows' clues. All lists of the columns' clues, as well as of
the rows' clues,...