Not quadratic in the length of the input. Assuming replace is linear this is also linear
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Not quadratic in the length of the input. Assuming replace is linear this is also linear