I got the wrong answer with log like this:
Can anybody explain why is the expection output or the testing case is wrong?
@victorzhang21503 Expected is correct.
- The first square is from x = 9 to x = 16, and has a height of 7. The bottom edge is at y = 0.
- The second square is from x = 1 to x = 10, and has a height of 16. The bottom edge is at y = 7.
- The third square is from x = 3 to x = 4, and has a height of 17. The bottom edge is at y = 16.
@awice Thanks to explain, I see why my understanding before was wrong. The square as a whole could not be splited to hit the lowest ground!