Find K complemantary pairs of numbers in an array