Kanini interview question

find all the array pairs