Skip to content

Latest commit

 

History

History
16 lines (14 loc) · 366 Bytes

2335.md

File metadata and controls

16 lines (14 loc) · 366 Bytes

2335. Minimum Amount of Time to Fill Cups

Solution 1 (time O(1), space O(1))

class Solution(object):
    def fillCups(self, amount):
        """
        :type amount: List[int]
        :rtype: int
        """
        amount.sort()
        if amount[2] >= amount[0] + amount[1]:
            return amount[2]
        return (sum(amount) + 1) // 2