Second constructed linked list is : 35 . 1 . 12 . 1 . 10 . 34
second = push ( second , 35 ) ; second = push ( second , 1 ) ; second = push ( second , 12 ) ; second = push ( second , 1 ) ; second = push ( second , 10 ) ; second = push ( second , 34 ) ; if ( isPermutation ( first , second ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }