Java O(n) beat 100%
\n    public int getWinner(int[] arr, int k) {\n        int res = arr[0], cnt = 0;\n        for (int i = 1; i < arr.length; i++) {\n            if (arr[i] > res
```\n    public int getWinner(int[] arr, int k) {\n        int res = arr[0], cnt = 0;\n        for (int i = 1; i < arr.length; i++) {\n            if (arr[i] > res) {\n                cnt = 0;\n                res = arr[i];\n            } \n            if (++cnt == k) return res;\n        }\n        return res;\n    }\n```
[]