Click here to Skip to main content
15,914,225 members

Comments by Zhengxi Jiang (Top 1 by date)

Zhengxi Jiang 2-Sep-21 7:39am View    
it is a game about put cubes together. there are rules: 1. you can only take the leftmost or the rightmost of the cubes. these integers reprenst the sidelength of the cubes. the cubes i on top of cube j has to smaller than the cubes j. if according to the rules i can build it, answer is yes, otherwise it is no, means not possible to build. but here the problem is the code, why the while loop not keep on delete 4, after that 3 and 1, it goes to the higher 'for loop'. in fact it works as if is no while loop ,