Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
mlgh
· 9y ago · 0 comments
Sorry, but the implementation posted is O(|pattern| * |name|), not linear.
http://ideone.com/2xCXyY
Comments
[–]
burntsushi
9y ago
The size of the pattern is held as constant. Or more accurately, "it's linear" is an abbreviated form of "it's linear in the size of the text searched."