Hacker News new | ask | show | jobs
by joshuahutt 2293 days ago
This was one of the first problems I tackled as a developer. My naive approach was to calculate the values of the offers independently, pick the top one, and then continue to try to apply remaining offers. Obviously, it's not the optimal solution, but I thought it worked well for the problem, because people like thinking they got a really big discount, even if their total savings might be less.