Assume you are preparing a coin price calculating machine. Prepare an Algorithm for calculating the total price of given coins (#Coins = n) of different Values (1 Rupee (size = 2 cm), 2 Rupee (3 cm), 5 Rupee (size 1 cm) and 10 Rupee (5 cm)). And compute the time and space complexity of your algorithm
Comments
Leave a comment