InterviewSolution
Saved Bookmarks
| 1. |
Suppose I have a red block (R) of height 1, a blue block (B) of height 2, and a green block (G) of height 3. I can stack the blocks one above the other to build a tower. For example, I can stack in the order RBG and I would get a tower of height 6. I wish to compute how many different towers of a given height n can be built if there are ample blocks of each colour. Let T(n) denote the number of towers of height n. Write a program that prints T(n) given n. |
| Answer» TION:i don't KNOW........... | |