Workday Interview Question

find distinct pairs from an array list.