single loop solution without using data structure
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: o(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: o(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int getWinner(int[] arr, int k) {\n        int count = 0;\n        int j =1;\n        int i =0;\n\n        while(j<arr.length){\n            if (arr[i]>arr[j]){\n                count++;\n            }\n            else{\n                i = j;\n                count = 1;\n            }\n\n            if (count == k){\n                return arr[i];\n            }\n\n            j++;\n        }\n\n        return arr[i];\n    }\n}\n```
['Two Pointers', 'Java']