I’m still new to Data Structure and Algorithm and therefore I would like to ease my doubts. I’m required to find the BigO running time of myMethod():
Static int doIt(int n) { for πβ1 π‘π 100 do > 100 for πβ1 π‘π π do > n x 100 πβ1;πβπ > 1 while π<π do > lg n πβ(π+π)/2 > lg n/2 end while end for end for } static int myMethod(int n) { π β1 π€βπππ (π < π) { > lg n πππΌπ‘(π) > ? πβπΓ2 > lg n } πππ‘π’ππ 1; }
For each of the line I have inserted the answer I think would be a logical value to put e.g "> 100". However I am not confident with the answer. These are the following questions that I would like to ask as well:

Does all while loop have a value of lg n?

If the doIt(n) method does not have a return statement, do we still add in part of calculation?

For the line with m < (m+j)/2, the value I have inputted is lg n /2. Is that correct or is it some other value?

Whenever multiplying by 2 or dividing by 2 is it always lg 2? what if n is multiplied by 3?
Thank You