drod's blog

By drod, 10 years ago, In English

Given two strings A and B, your task is to find a substring of A called justice string, which has the same length as B, and only has at most two characters different from B.

Both string A and B contain lowercase English letters from a to z only. And the length of these two strings is between 1 and 100000, inclusive.

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it