coin change Algorithm

The advent of paper money in the mid-17th century and the development of modern banking and floating exchange rates in the 20th century allowed a foreign exchange market to develop. This provided a manner for banks and other specialist fiscal company such as bureaux de change and forex brokers to easily change one state's money for another, and with the added confidence of transparency. 

When outsiders, particularly traveling merchants, visited towns for a market fair, it became necessary to exchange foreign coins to local ones at local money changers. The merchant could then withdraw the money in local currency to conduct trade or, more likely, keep it deposited: the money changer would act as a clearing facility. In ancient times in Jerusalem, pilgrims visiting the Jewish Temple on Jewish Holy day would change some of their money from the standard Greek and Roman currency for Jewish and Tyrian money,

coin change source code, pseudocode and analysis