Skip to main content
edited body
Source Link
SohamC
  • 221
  • 2
  • 6
z(0) = 65 = length(S)
z(1) = 0
z(2) = 1
z(3) = 2
z(4) = 0
z(0) = 6 = length(S)
z(1) = 0
z(2) = 1
z(3) = 2
z(4) = 0
z(0) = 5 = length(S)
z(1) = 0
z(2) = 1
z(3) = 2
z(4) = 0
edited tags
Link
200_success
  • 145.7k
  • 22
  • 191
  • 481
Post Merged (destination) from codereview.stackexchange.com/questions/54021/…
Tweeted twitter.com/#!/StackCodeReview/status/476716437789106178
Post Reopened by Corbin, Morwenn, Simon Forsberg, rolfl
added 35 characters in body
Source Link
SohamC
  • 221
  • 2
  • 6

I was trying to refactor the following Python code (keeping the same time-complexity) which is an implementation of Z-Algorithm for pattern matching in strings.

I was trying to refactor the following Python code which is an implementation of Z-Algorithm for pattern matching in strings.

I was trying to refactor the following Python code (keeping the same time-complexity) which is an implementation of Z-Algorithm for pattern matching in strings.

deleted 4 characters in body
Source Link
SohamC
  • 221
  • 2
  • 6
Loading
Post Closed as "Not suitable for this site" by 200_success
put original / pre-refactor code in a quote block
Source Link
Mathieu Guindon
  • 75.6k
  • 18
  • 195
  • 469
Loading
deleted 44 characters in body; edited tags; edited title
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238
Loading
Source Link
SohamC
  • 221
  • 2
  • 6
Loading