-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix merge conflict & modularize scoop scoring
Resolves a latent merge conflict in how the `state` variable is used. Modularizes the code used to score and rank scoops so that we can re-use it for scoring scoops available for other players. Resolves an issue where it took O(n) time to pop the best flavor off of the queue. Instead of sorting in reverse order and popping the first element we can sort in non-decreasing order and pop the last element in constant time.
- Loading branch information
1 parent
c11b173
commit af80d4b
Showing
1 changed file
with
28 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters