WHAT IS THE TIME COMPLEXITY?

TIME AND SPACE UTILIZED EXPLAIN

hi… time and space complexity would be O(N)

can you explain it a little bit???

hi… so since we are traversing over the entire string only once ie. running a single loop so complexity would be o(n) only

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.