String c++ immutable time complexity appending

In c++ strings as they are immutable .
On performing the operation string s = (some string) + ‘a’.
would take O(n( time complexity.

Am i right?

hello @dtewari2001

yeah u r right, it will be O(n)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.