a) O(n) where n is the length of the equation
b) O(n) where n is number of operands
c) O(1)
d) O(logn) where n is length of the equation
Answer: a
Explanation: The processes that are involved are reversing the equation (O(n)), pushing them all onto the stack(O(n)), and popping them one by one and solving them (O(n)). Hence the answer is O(n) where n is the length of the equation.
Related Posts
The condition flag Z is set to 1 to indicate _______
When using Branching, the usual sequencing of the PC is altered. A new instruction is loaded which is called as ______
While using the iterative construct (Branching) in execution _____________ instruction is used to check the condition
The Instruction fetch phase ends with _________
The two phases of executing an instruction are __________
In a system, which has 32 registers the register id is __________ long.
The instruction, Add R1,R2,R3 in RTN is _______
Join The Discussion