If we have found a char equal to current char and does not exist side to it , return false
if ( st . Contains ( str [ i ] ) & ! st . Equals ( str [ i ] ) ) { return false ; } st . Add ( str [ i ] ) ; } return true ; }