LeetCode
Elimination Game
Click
here
for an explanation.