
Postlab Activities
Exercise 1: How many possible bridge hands are there? This question is a specific case
of a general question: How many combinations of X items can I make out of Y items?
In the case of the bridge hand, X is 18 and Y is 52. The solution is given by the
following formula:
Combinations(Y, X) =
Y if X = 1
1if X = Y
(Combinations(Y –1, X – 1) + Combinations(Y –1, X)) if Y > X > 1
Write a recursive function that calculates the number of combinations of X items that
can be made from Y items. Write a driver and answer the original questions.
Exercise 2: Write a recursive void function that prints the contents of an array-based
list in reverse ...