Minimum Amount of Time to Fill Cups LeetCode solution in Python
1# Runtime: 42 ms (Top 62.11%) | Memory: 13.9 MB (Top 56.09%)2class Solution:3def fillCups(self, amount: List[int]) -> int:45count = 06amount = sorted(amount, reverse=True)7while amount[0] > 0:8amount[0] -= 19amount[1] -= 110count += 111amount = sorted(amount, reverse=True)12return count