Checking if the reverse of the String is already present in the set
else if ( dict . contains ( t ) ) { left . add ( S . get ( i ) ) ; right . add ( t ) ; dict . remove ( S . get ( i ) ) ; dict . remove ( t ) ; } } printPalindrome ( left , mid , right ) ; }