Logic
Intuition\n Describe your first thoughts on how to solve this problem. \nJust See the code u will get everything\n\n\n# Approach\n Describe your approach to sol
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nJust See the code u will get everything\n\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nJust See the code u will get everything\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nJust See the code u will get everything\n\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nJust See the code u will get everything\n\n\n# Code\n```\nclass Solution(object):\n    def getWinner(self, arr, k):\n        """\n        :type arr: List[int]\n        :type k: int\n        :rtype: int\n        """\n        c=0\n        p=1\n        m=1\n        if(len(arr)<k):\n            return max(arr)\n        \n        while(m==1):\n            if(p==len(arr)):\n                p=1\n            if(arr[0]>arr[p]):\n                c+=1\n                p+=1\n            else:\n                t=arr[0]\n                arr[0]=arr[p]\n                arr[p]=t\n                p+=1\n                c=1\n                \n            if(c==k):\n                return arr[0]\n            \n            \n\n\n\n        \n```
['Python']