s1="eat",s2="aet",then s2 is a scrambled string of s1?WHY?

  • 0

    I mean, after reading the description, I think that if s1="eat", then s1 has 4 scrambled strings,that is "eat","eta","ate","tae". But when I set s1="eat",s2="aet" or "tea", the espected answer is "TRUE" rather than "FALSE".WHY? The description does't demenstrate well!!!

  • 0

    @coolkilling eat can be as:

               /      \
           ea          t
         /    \
       e     a

    When you switch e an a, then you have aet String.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.