Easy to Understand O(1)  space and O(n) time solution java
/we follow two pt approach a left pt is used to maintain winner at any point in time and right pt is traveresed till end contesting, if k rounds are succesfully
/*we follow two pt approach a left pt is used to maintain winner at any point in time and right pt is traveresed till end contesting, if k rounds are succesfully won by a value its winner else the value on left is winner*/\n\t  \n\t  \n    public int getWinner(int[] arr, int k) {\n        int left=0,right=1,init=k;\n        while(right<arr.length){\n            if(arr[left]>arr[right]){\n                right++;\n                k--;\n            }else{\n                int temp=arr[left];\n                arr[left]=arr[right];\n                arr[right]=temp;\n                k=init;\n            }\n            \n            if(k==0)\n                return arr[left];\n        }\n        return arr[left];\n    }
['Java']