Previous work on hackerrank's Triplets. Passes 66%.