Hacker News new | past | comments | ask | show | jobs | submit login

Not my first project, but an assignment in the first year. It was about minimizing coin change. I had a solution very different from the others, and the teacher wrote something along the lines of "I suppose that'll work too" on my solution. Can't remember what I came up with, though.



Calculate smallest coinage (in terms of value of each coin) amount and progressively replacing them with the next higher amount? 2x1 cent -> 1x 2 cents, 2x2 cents +1x1 cent -> 1x5 cent and so on, maybe?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: