Interview Question

Interview

number of ways to make change when a $1 bill is given and

  the product cost is less than $1
Answer

Interview Answer

1 Answer

0

Well, one way I looked at it is that since the product costs < $1 and there are 100 cents in a dollar. So we can use combination of 99 to figure out the total number of ways to give back the change. For instance: the product could cost 1 cent giving 99 cent change back or it would cost 99 cents giving 1 cent back. Hence we have 99! ways to give the change back (since order is not defined here).

Anonymous on May 30, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.