norvig / pytudes

Python programs, usually short, of considerable difficulty, to perfect particular skills.
MIT License
23.12k stars 2.43k forks source link

Bug in Day 1 function #100

Open d-e-h-i-o opened 3 years ago

d-e-h-i-o commented 3 years ago

The code for day 1 that finds entries that sum to 2020 assumes that every entry is unique. However, this assumtion is not supported by the assignment, so it doesn't find the answer in the case that the expense report contains the number 1010 twice (which isn't even that unlikely for an expenses report).