this means one of the stacks has extra leaves , hence return false .
if ( s1 . empty ( ) || s2 . empty ( ) ) return false ; Node * temp1 = s1 . top ( ) ; s1 . pop ( ) ; while ( temp1 != NULL && ! isLeaf ( temp1 ) ) {