Hackerrank Problem Solving Intermediate Task Of Pairing Solution