+1 vote
in Data Structures & Algorithms I by (110k points)
What is the time complexity of evaluation of postfix expression algorithm?

(a) O (N)

(b) O (N log N)

(c) O (N^2)

(d) O (M log N)

Origin of the question is Application of Stacks in portion Application of Stacks of Data Structures & Algorithms I

The question was asked in homework.

1 Answer

+1 vote
by (408k points)
selected by
 
Best answer
Correct choice is (a) O (N)

The explanation is: The time complexity of evaluation of infix, prefix and postfix expressions is O (N).

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...