Complexity issue

If , i am using nested loop in base case(say for printing somthing which takes O(n^2),

and my recursive call are linear in time (say for ex. printing natural no till n, takes O(n) from recursion )

what will be my overall complexity ?
will it be (n+n^2) or (n*n^2)

hello @Sus
it will be O(n+n^2)

o(n) to hit base case and the O(n^2) to perform some operation so overall it will be O(n+n^2)

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.