LeetCode
Split Array into Consecutive Subsequences
Click
here
for an explanation.