✅[Python] Simple and Clean, beats 77.69%✅
Please upvote if you find this helpful. \u270C\n\n\nThis is an NFT\n\n##### Single Pass Solution\n1. People before k-th person will take mininum of reqd tickets
### Please upvote if you find this helpful. \u270C\n<img src="https://assets.leetcode.com/users/images/b8e25620-d320-420a-ae09-94c7453bd033_1678818986.7001078.jpeg" alt="Cute Robot - Stable diffusion" width="200"/>\n\n*This is an NFT*\n\n##### **Single Pass Solution**\n1. People before *k-th* person will take mininum of reqd tickets and *k-th* person ticket\n2. People after *k-th* person will take 1 ticket less than, because after oue person takes the ticket the objective will be completed and we do not need to count more time for people **standing after him**\n\n##### **Implementation**\n```\nclass Solution:\n    def timeRequiredToBuy(self, tickets: List[int], k: int) -> int:\n        num = tickets[k]\n        res = 0\n        for i in range(k+1):\n            res += min(tickets[i],num)\n        for i in range(k+1,len(tickets)):\n            res += min(tickets[i],num-1)\n        return res\n```\n\n![image](https://assets.leetcode.com/users/images/7ab4074a-00a1-49e3-a1fb-fc62d50bfe0f_1661594988.4600484.png)\n
['Greedy', 'Python']