Created
February 15, 2020 08:16
-
-
Save JohnItoo/d1d8cff2fdbd824717c196e89d39d450 to your computer and use it in GitHub Desktop.
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
public void decideOne() { | |
int sliz = slices.size(); | |
for (int i = sliz - 1; i >= 0; --i) { | |
if (maxPizzas - slices.get(i) < 0) continue; | |
maxPizzas -= slices.get(i); | |
solution.add(i); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment