Beats 100%, USING RECURSION
Intuition\nDecrease the tickets counting in array by 1 simultaneously calculate time till the kth index element in array becomes 0.\n\n# Approach\nstep 1- take 
# Intuition\nDecrease the tickets counting in array by 1 simultaneously calculate time till the kth index element in array becomes 0.\n\n# Approach\nstep 1- take time variable as 0.\nstap 2- traverse on tickets array simultaneously\n        1. decrease each elements by 1 and increase time by 1.\n        2. if the kth element becomes 0 then return time.\n        3. use recursive calls of step 2(for multiple traversals) until kth element becomes 0  and also calculate time .\n        4. base condition if tickets[k]==0 return 0(time).\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int timeRequiredToBuy(int[] tickets, int k) {\n        if(tickets[k]==0){\n            return 0;\n        }\n        int time=0;\n        for(int i=0;i<tickets.length;i++){\n            if(tickets[k]==0){\n                return time;\n            }\n            if(tickets[i]==0){\n                continue;\n            }\n            if(tickets[i]!=0){\n                tickets[i]--;\n                time++;\n            }\n        }\n        time+=timeRequiredToBuy(tickets,k);\n        return time;\n    }\n}\n```
['Java']