https://leetcode.com/problems/maximum-length-of-pair-chain/