3 ms·
I don't understand how anyone could implement an O(n^2) substring implementation and not think, "this seems really wrong".
by aisofteng 10y ago
I don't understand how anyone could implement an O(n^2) substring implementation and not think, "this seems really wrong".
- taeric 10y agoI'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?
- magicalist 10y agoThe substring implementation is O(n), it's the loop popping off a letter at a time that ends up O(n^2).