Hi, fellow code wizards, need your input.
I think I found an error in Cash Register project, the last one from JavaScript Algorithms and Data Structures section. The third test case with 3.26 price and 100 cash (change 96.74), wants output:
change: [
[“TWENTY”, 60],
[“TEN”, 20],
[“FIVE”, 15],
[“ONE”, 1],
[“QUARTER”, 0.5],
[“DIME”, 0.2],
[“PENNY”, 0.04]
]
But my solution provides:
change:
[ [ ‘TWENTY’, 80 ],
[ ‘TEN’, 10 ],
[ ‘FIVE’, 5 ],
[ ‘ONE’, 1 ],
[ ‘QUARTER’, 0.5 ],
[ ‘DIME’, 0.2 ],
[ ‘PENNY’, 0.04 ] ]
Which is also correct, but uses more twenty bills. Can someone fix it? I really want to finish this course, what should I do?