HOW COME TIME COMPLEXITY IS O(N)?

Here we’re using 2 loops, then why we’re saying this solution has time complexity of O(n). It should be somewhere between 0(n^2) and O(n).

Hello @dev.divyanshu19could you please share the code you are talking about.

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.