0

How many times will be the statement be executed?

https://code.sololearn.com/crQyCq8Wsy4w/?ref=app I am getting log(n) + 1 but answer is log(n)

11th Oct 2019, 4:38 PM
Tarun Mali
Tarun Mali - avatar
4 Antworten
+ 1
The code will not compile, type of variable <p> and <i> is unknown, also <n> is undeclared.
11th Oct 2019, 4:49 PM
Ipang
+ 1
Just assume all the necessary things are present
11th Oct 2019, 4:50 PM
Tarun Mali
Tarun Mali - avatar
+ 1
I don't know how many times the code will run since variables aren't declared.
12th Oct 2019, 12:05 AM
HNNX 🐿
HNNX 🐿 - avatar
+ 1
Just assume it a pseudocode written to understand a topic and not a full fledged prohram
12th Oct 2019, 11:36 AM
Tarun Mali
Tarun Mali - avatar