Easy Java Solution
\nclass Solution {\n    public int timeRequiredToBuy(int[] tickets, int k) {\n    int count=0;\n        while(tickets[k]>0){\n            for(int i=0;i<tickets.
```\nclass Solution {\n    public int timeRequiredToBuy(int[] tickets, int k) {\n    int count=0;\n        while(tickets[k]>0){\n            for(int i=0;i<tickets.length;i++){\n                if(tickets[i]>0){\n                    tickets[i]-=1;\n                    count++;\n                }\n                if(tickets[k]==0)break;\n            }\n        }\n        return count;\n    }\n}\n```
['Java']