GATE DA Python Data Structures & Collections | Set 1

Questions 61-65 of 100

0% completed (0/100 answered)
Your score 0/100 0 answered
Correct 0 Incorrect 0 Unanswered 100 Accuracy 0%

Question 61

MCQ · Single Correct 1 mark

What is the amortized time complexity per operation for append() and pop() at the right end of a Python list?

Answers for question 61

Question 62

NAT · Numerical Answer 1 mark

Consider a stack S and queue Q. S is populated with [1, 2, 3, 4, 5] (5 at top). All elements are popped from S and enqueued into Q. Then all elements are dequeued from Q and pushed into S. What element is now at the top of S?

Answers for question 62

Question 63

MCQ · Single Correct 1 mark

Which traversal method of an expression tree corresponds to the POSTFIX form of the underlying mathematical expression?

Answers for question 63

Question 64

NAT · Numerical Answer 1 mark

What is the output of the following stack simulation in Python?

PYTHON
stack = []
for x in [5, 10, 15]:
    stack.append(x)
    stack.append(x * 2)
    stack.pop()
print(stack[-1])
Answers for question 64

Question 65

MCQ · Single Correct 1 mark

What is the postfix form of the infix expression (A + B) * C?

Answers for question 65
Scroll to Top