+ 1

Hello! Do you know how many times is the function called?(according to n)

https://code.sololearn.com/ctdM5VutdG2X/?ref=app

26th Feb 2021, 2:48 PM
narges ghanbari
narges ghanbari - avatar
1 Answer
+ 1
narges ghanbari for value of n between 2 to 4 , runs 2*2-1 times ---------- for value of n between 4 to 8, runs 4*2-1 times, ----------- for value of between 8 to 16, runs 8*2-1 times and so on. Check the following code, https://code.sololearn.com/cs84pomT48n1/?ref=app
26th Feb 2021, 3:32 PM
Abhay
Abhay - avatar