EASY SOLUTION BEATS 100% OF JAVA PEOPLE
Approach\n\nIterare over the array (arr) and keep track of the highest number and it\'s victories until k victories :=)\n\n\n# Complexity\n- Time complexity: O(
# Approach\n\nIterare over the array (arr) and keep track of the highest number and it\'s victories until k victories :=)\n\n\n# Complexity\n- Time complexity: O(n) \n\n- Space complexity: O(1)\n\n# Code\n```\nclass Solution {\n    public int getWinner(int[] arr, int k) {\n\n        int max = Integer.max(arr[0], arr[1]);\n        int victories = 1;\n\n        for(int i = 2; i < arr.length && victories < k;++i){\n            \n            if (arr[i] > max){\n                victories = 1;\n                max = arr[i];\n            }else {\n                victories++;\n            }\n        }\n\n        return max;\n\n    }\n}\n```
['Java']