Closing Triplets Hackerrank Solution Github