josmoo / AmuletOfChemistryAlerter

alerts the user when they try and make a potion without an amulet of chemistry
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

update bank search to use binary search #6

Closed josmoo closed 1 week ago

josmoo commented 1 week ago

97068ca5cb7b4c4a06c4c2527707e93c55890431

josmoo commented 1 week ago

I did not realize at the time, but unfortunately I don't think a true binary search is possible in this context. While it was fun to write a psuedo-binary search, it should be roughly the same complexity given the smaller size of the list to be searched. Unfortunately it is also significantly less readable than a single for loop, so I think this will never be implemented.