Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Sure, you can even use a quantum supercomputer if you want; the point of this kata is that clever > brute force!
There is a clever solution, that I can use with only pen and paper, which will be faster than someone using a brute force solution using NumPy etc.
Why couldn't you?
Hi @amirymax , thanks for attempting this kata.
The numbers in the 2 lists are referring to the widths of the N individual columns and the heights of the N individual rows.
If you focus on a specific column (say it has WIDTH = 5) and a specific row (say it has HEIGHT = 8) then the "intersection" of that column and that row will define a region on the board that has an AREA 5 * 8 = 40.
It's much clearer if you refer to the N = 5 example on the kata, with the nice picture:
Use the picture to see if you can match my calculations of the areas. For example, moving from left to right on the top row of the example, there are 5 different regions: 1st one is is WHITE and has area = 1x3, 2nd one is BLACK and has area 1x1, 3rd one is WHITE and has area 1x2, 4th one is BLACK and has area 1x7, 5th one is WHITE and has area 1x1.
Repeat this for the entire N = 5 board, on a piece of paper (it's quick), and see if you can find the values: total white area = 146, total black area = 134.