Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • \$\begingroup\$ This returns true for input aab, unfortunately. \$\endgroup\$ Commented Aug 13, 2019 at 13:36
  • \$\begingroup\$ @maxb, thanks for checking. s. replaced with (s+s). to handle that. \$\endgroup\$ Commented Aug 13, 2019 at 15:33
  • \$\begingroup\$ Good job! Though now I noticed that it fails for aaaabb and aabbbb. \$\endgroup\$ Commented Aug 13, 2019 at 16:57
  • \$\begingroup\$ @maxb, apologies, now I tested on all your test cases from starting post. \$\endgroup\$ Commented Aug 14, 2019 at 0:09