Data Structure and Algorithms (DSA) MCQs with answers Page - 75

Here, you will find a collection of MCQ questions on Data Structure and Algorithms (DSA). Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. Pushing an element into stack already having five elements and stack size of 5, then stack becomes

  • (A) Overflow
  • (B) Crash
  • (C) Underflow
  • (D) User flow

A

Admin • 833.24K Points
Coach

Q. Entries in a stack are “ordered”. What is the meaning of this statement?

  • (A) A collection of stacks is sortable
  • (B) Stack entries may be compared with the ‘<‘ operation
  • (C) The entries are stored in a linked list
  • (D) There is a Sequential entry that is one by one

A

Admin • 833.24K Points
Coach

Q. Which of the following is not the application of stack?

  • (A) A parentheses balancing program
  • (B) Tracking of local variables at run time
  • (C) Compiler Syntax Analyzer
  • (D) Data Transfer between two asynchronous process

A

Admin • 833.24K Points
Coach

Q. Consider the usual algorithm for determining whether a sequence of parentheses is balanced. Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order). The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?

  • (A) 1
  • (B) 2
  • (C) none
  • (D) none

A

Admin • 833.24K Points
Coach

Q. What is the value of the postfix expression 6 3 2 4 + – *?

  • (A) 1
  • (B) 40
  • (C) 74
  • (D) -18

A

Admin • 833.24K Points
Coach

Q. The postfix form of the expression (A+ B)*(C*D- E)*F / G is?

  • (A) AB+ CD*E – FG /**
  • (B) AB + CD* E – F **G /
  • (C) AB + CD* E – *F *G /
  • (D) AB + CDE * – * F *G /

A

Admin • 833.24K Points
Coach

Q. The data structure required to check whether an expression contains balanced parenthesis is?

  • (A) Stack
  • (B) Queue
  • (C) Array
  • (D) Tree

A

Admin • 833.24K Points
Coach

Q. What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?

  • (A) Linked List
  • (B) Stack
  • (C) Queue
  • (D) Tree

A

Admin • 833.24K Points
Coach

Q. The process of accessing data stored in a serial access memory is similar to manipulating data on a

  • (A) Heap
  • (B) Binary Tree
  • (C) Array
  • (D) Stack

A

Admin • 833.24K Points
Coach

Q. The postfix form of A*B+C/D is?

  • (A) *AB/CD+
  • (B) AB*CD/+
  • (C) A*BC+/D
  • (D) ABCD+/*