Workday interview question

find distinct pairs from an array list.