← Questions
Arrange crops into connected regions of a garden
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A rectangular garden has N rows and M columns, and there are K crop types. Crop i must take exactly count[i] cells, and the counts add up to N * M. Return any planting that uses every cell once and keeps each crop in a single connected region.
A later part asks the same for a garden made of two squares instead of one rectangle.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
