A.S->stack[S->top]=x B.S->top++ C.S->top-- D.x=S->stack[S->top]
設(shè)有程序段 i=1; while (i<=n) i=i*2; 上面程序段的時(shí)間復(fù)雜度為()。
A、O(n) B、O(log n) C、O( nlog n) D、O(n2)
A.O(1) B.O(n) C.O(n2) D.O(n3)