Rally want to know!
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.