Kemal's blog

By Kemal, history, 8 years ago, In English

What's the time complexity of substr() function in C++? I've tried this code by entering the string of size 10^5 , but it worked in less than one second.

  • Vote: I like it
  • +1
  • Vote: I do not like it

| Write comment?
»
8 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Maybe compiler performs this optimization ?