Sponsored
Use these hints if you're stuck. Try solving on your own first.
If k ≥ arr.length return the max element of the array.
If k < arr.length simulate the game until a number wins k consecutive games.
Solve with full IDE support and test cases