Simple 10lines of code | O(n) SOLUTION
\nclass Solution {\npublic:\n    int getWinner(vector<int>& arr, int k) {\n\t\n        int n = arr.size();\n        int win_count =0;\n        int winner = arr[
```\nclass Solution {\npublic:\n    int getWinner(vector<int>& arr, int k) {\n\t\n        int n = arr.size();\n        int win_count =0;\n        int winner = arr[0];\n        for(int i=0; i<n-1; i++){\n            if(winner > arr[i+1]){\n                \n                win_count++;   \n            }\n            else{\n                winner = arr[i+1];\n                win_count =1;\n            }\n            if(win_count == k){\n                return winner;\n            }\n        }\n        return winner;\n        \n    }\n}; \n```\n\n```\n//TC : O(n) --> length of the array\n\n//SC: constant \n```\n
[]