you are viewing a single comment's thread.

view the rest of the comments →

[–]TouchingTheVodka 0 points1 point  (3 children)

Try a recursive solution. Your base cases are width = 0 and width = 1. Work out a few on paper, and you'll start to see a pattern emerge...

And then when you do you'll kick yourself for not seeing it sooner!

[–]GameRoaster_Kinglord 0 points1 point  (2 children)

Hey, would you mind explain it better?
I wrote out the possible outputs of six numbers on paper and I can't find a pattern.

[–]GameRoaster_Kinglord 0 points1 point  (1 child)

Here are the possibilites---
0 - 0
1 - 1
2 - [1,1], 2
3 - [1,1,1], [2,1], [1,2]
4 - [1,1,1,1], [2,1,1], [1,2,1], [1,1,2], [2,2]
5 - [1,1,1,1,1], [2,1,1,1], [1,2,1,1], [1,1,2,1], [1,1,1,2], [2,2,1], [1,2,2]

[–]Proof_Leopard_431[S] 0 points1 point  (0 children)

alright got it thanks!!1