Last man standing problem
Two inputs
1. Stream of numbers - 1,3,5,8,9,12,40 etc
2. Step number eg: 1
I have write a program that starts with first number and then steps on the 2nd and then returns 5 and steps on 8 and return 8 - program has to keep on working until only one number from the stream remains.
When the step counter crosses the total numbers, it overflows to the beginning