How do you pass the case "abaababbaba" with ["ab","ba","ab","ba"]

  • 0

    In case "abaababbaba" with ["ab","ba","ab","ba"], it should be [1,4]

    When you match first "ab", it will step forward by 2, which brings it to "aababbaba". It will miss "ba" in position 1.

Log in to reply

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