-1
런타임 T (n)을 결정하려는 다음 의사 코드가 있습니다. 누군가 따라야 할 단계를 줄 수 있습니까?의사 코드의 실행 시간 결정
i := 1;
while (i <= n)
j := i;
x := x+A[i];
while (j > 0)
y := x/(2*j);
j = j /2; // Assume here that this returns the floor of the quotient
i = 2 * i;
return y;
@saydak 업데이트 계산 –