Re:Adventures in the land of substrings and RegExps
by aisofteng on Saturday December 03, 2016 @02:36PM
(#13097142)
I don't understand how anyone could implement an O(n^2) substring implementation and not think, "this seems really wrong".
[ Parent
| on HN ]
Re:Adventures in the land of substrings and RegExps
by taeric on Saturday December 03, 2016 @03:59PM
(#13097465)
I'm not sure I understand your post. There are tradeoffs to different ways of implementing substring. They were fairly well covered in this page.
Are there points you disagree with?
Re:Adventures in the land of substrings and RegExps
by magicalist on Saturday December 03, 2016 @04:22PM
(#13097557)
The substring implementation is O(n), it's the loop popping off a letter at a time that ends up O(n^2).