LeetCode Solution, Medium, 180. Consecutive Numbers