Confusion about the question itself


  • 0
    C

    I failed in a very simple test case -- "bdac" is not a scramble string of "abcd".

    But, can I split the "abcd" as "abc" and "d", then further split "abc" as "ab" and "c". Then, if I swap the 1st level "abc" and "d" and the 2nd level "ab", I can have "dbac". I don't know where I go wrong...


  • 2
    M
    "bdac"
    "dbac"
    

    Your two solutions are not the same.

    I agree with you that dbac is a scramble string of abcd, but bdac is not.


  • 0
    Y

    The same question. 'abcd' can be easily changed to 'abdc', then 'badc', and split it as 'b' and 'adc', split 'adc' as 'ad' and 'c', swap 'a' and 'd' then we get bdac. Is there anything wrong?


Log in to reply
 

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