Sort by

recency

|

1 Discussion

|

  • + 1 comment

    Question is not clear. Can anyone explain question with example. like why in 2nd example BAABBB is not a valid string ??

    • + 0 comments

      Because in this example prefix BAA contains more 'A's than 'B's. You can rephrase the description as whether you count all 'A's and 'B's from the start to the right or from the end to the left, there shouldn't be more 'A's at any point.

No more comments