Change Machine:
Output is a string representing a bizarre verbal equivalent of the change that is due, in alphabetical order. If the change should be $80.50 the returned string should be "FIFTY, HALF DOLLAR, TEN, TWENTY"
This was according to a list like so:
[HUNDRED,
FIFTY,
TWENTY,
TEN,
FIVE,
TWO,
ONE,
HALF DOLLAR,
QUARTER,
DIME,
NICKEL,
PENNY]
-- x --
Java solution preferred.
-- x --
Is there a leetcode equivalent for this? I would like to verify my solution.