C++ one pass
\nint getWinner(vector<int>& arr, int k) {\n\tint k1=k, winner=arr[0];\n\tfor(int i=1; i<arr.size() && k1; i++){\n\t\tif(winner<arr[i]){\n\t\t\twinner=arr[i];\n
```\nint getWinner(vector<int>& arr, int k) {\n\tint k1=k, winner=arr[0];\n\tfor(int i=1; i<arr.size() && k1; i++){\n\t\tif(winner<arr[i]){\n\t\t\twinner=arr[i];\n\t\t\tk1=k;\n\t\t}\n\t\tk1--;\n\t}\n\treturn winner;\n}\n```
['C', 'C++']