c++ | easy | short
\n# Code\n\nclass Solution {\npublic:\n  int getWinner(vector<int>& A, int k) {\n        int cur = A[0], win = 0;\n        for (int i = 1; i < A.size(); ++i) {\
\n# Code\n```\nclass Solution {\npublic:\n  int getWinner(vector<int>& A, int k) {\n        int cur = A[0], win = 0;\n        for (int i = 1; i < A.size(); ++i) {\n            if (A[i] > cur) {\n                cur = A[i];\n                win = 0;\n            }\n            if (++win == k) break;\n        }\n        return cur;\n    }\n};\n```
['C++']