Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

renovated2020's blog

By renovated2020, 12 years ago, In English

What is the most efficient algorithm or approach for finding most frequent k-length sub-string from a given string?

  • Vote: I like it
  • -4
  • Vote: I do not like it

| Write comment?
»
12 years ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

Hash all substrings of length K in O(N) and store this values in map O(NlogN)