Time complexity of Recursive function

How to determine the time complexity of the recursive function ?

Watch these 2 videos:


@pratyush63 got some idea to compute the time complexity

To to sort the indexes and of the original vectors can we use the vectors pair v.first store the element and second sort the address ?

For time complexity of a recursive function, multiply the range of changing parameters of the function with any while or for loops in the function definition.

@S19APP-PP0108 my question is this :
The statement vector< vector< int > > matrix(100, vector < int > (50, 100) ) declares
To to sort the indexes and of the original vectors can we use the vectors pair v.first store the element and second sort the address ?

vector<vector > v(100,vector(50,100) ) declares a 2D matrix of size 100X50 with each value equal to 100.

@Vikaspal Please mark your doubt as resolved if you are satisfied.

@S19APP-PP0108 where is mark as resolved in dicussion form

Well it must be appearing somewhere. Take a look.
Check the “Ask Doubt” section in your course as well.

1 Like

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.

1 Like