Codility - 石墙 - 堆栈和队列

Codility - Stone Wall - Stack and Queue

这是关于可亲性的一课, 看了好几遍,还是看不懂。

Link: https://app.codility.com/programmers/lessons/7-stacks_and_queues/stone_wall/

不明白的部分:

H[I] is the height of the wall from I to I+1 meters to the right of its left end. In particular, H[0] is the height of the wall's left end and H[N−1] is the height of the wall's right end.

每面墙的宽度都是固定的,所以当它说 "H[I] is the height of the wall from I to I+1 meters" 时,它的意思是 H[I] 是墙 H[I] 的高度,直到下一堵墙 H[I+1] 的开始。

H[0]是最左边的墙,H[N-1]是最右边的墙。