Leetcode 1743. Restore the Array From Adjacent Pairs | Hello Interview