Time Complexity of Naive Approach

In the naive approach we are taking nC1 i.e N time for 1 row,
Then for N rows we’ll take N*N=N^2 time.
Then how we are getting time complexity as N^N?

hello @rohitmathur.mathur.6

for first row u have made N calls and now these N calls will again make N new calls individually and this will continue till Nth row

N -> N^2 -> N^3->N^4 .......->N^N
1st   2nd  3rd    4th    Nth 

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.