Added methods to solve the Threepairs sum equal to K