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*

7
  • \$\begingroup\$ Sandbox \$\endgroup\$ Commented Mar 26, 2021 at 15:24
  • 6
    \$\begingroup\$ The fact that the last case is supposed to be false is a weird edge case. The empty string B is made of exactly 0 substring of any A, for any n. \$\endgroup\$ Commented Mar 26, 2021 at 16:10
  • \$\begingroup\$ @Arnauld I'll say no empty strings for A or B then \$\endgroup\$ Commented Mar 26, 2021 at 16:27
  • 1
    \$\begingroup\$ If n=2, a=abzaxy, and b=xyzab, should that return true or false? I'm guessing the "possibly overlapping" means that is true.... though I think the problem is more interesting if that one is supposed to be false. \$\endgroup\$ Commented Mar 27, 2021 at 17:55
  • \$\begingroup\$ @Jonah yes, that should be true \$\endgroup\$ Commented Mar 27, 2021 at 20:14