This is not actual code of money change problem.This code actually depicts swap,min,max,reverse and next_pemutation