Given pairs of adjacent elements
@ SuppressWarnings ( " unchecked " ) List < Pair > A = new ArrayList ( ) ; A . add ( new Pair ( 5 , 1 ) ) ; A . add ( new Pair ( 3 , 4 ) ) ; A . add ( new Pair ( 3 , 5 ) ) ; find_original_array ( A ) ; } }