Added test to ensure that the coin value sequence does not matter.
added magic input cleaning. (Algorithm fails when same coinvalue is present multiple times.)