[Python 1 line] Simplest Intuition Possible O(n)|O(1)
There are many people still confused about this one. So I will try to explain it as easily as possible.\nThink of it in real life. You have many cups and you ha
There are many people still confused about this one. So I will try to explain it as easily as possible.\nThink of it in real life. You have many cups and you have 2 taps.\n\n**Simple thing you will actually do**\nUse both the taps as long as you can. Just put a cup under each tap and keep filling water Replacing one cup for another. This will take **ceil(Total cups/2)** time. As you will fill 2 cups at once.\n\nThis *nearly* works.\nBut thing is, you can not use both taps for same temperature of water.\nNow before overanalyzing the issue, simply realise that this can be a problem if there is a requirement of a specific cup(let\'s say *hot*) more than **ceil(Total cups/2)** times. Otherwise, you will keep filling it whenever 1 tap is free.\n\nSo in this scenario, you will need time needed to **at least** fill those *hot* cups. As you will use one tap **only** for filling hot water. And with 1 tap you will fill the rest two types of cups. You can be sure that other two cups combined will not take more time as *one cup is more than half of requirement* (> ceil(Total cups/2) )\n\nSo answer is always\nmax( max(cups),  ceil(Total cups/2)) )\n\nAccepted code,\n```\ndef fillCups(self, amount: List[int]) -> int:\n        return max(int(math.ceil(sum(amount)/2)),max(amount))\n```
['Python']