Greedy works fine all test pass. Except the values having one value after decimal like 0.1, 4.5. Because in round function I'm using 100 as multiplier, the values become 10, 450 instead of 1 and 45.
bal = roundf(balu * 100);
Any clue how can I use it for both the inputs, for 0.54 as well as 0.3.
float
and then multiply by 100, check if it works.