You are currently viewing BCA Third Semester Data Structure and Algorithm -DSA MCQ 2023
DSA mcq 2023

BCA Third Semester Data Structure and Algorithm -DSA MCQ 2023

DSA MCQ 2023

i. What is the overflow condition in a queue?

  1. Rear < Front
  2. Front == SIZE – 1
  3. Rear == SIZE – 1
  4. Front == Rear

ii. What is the postfix of the expression A + B * C / D?

  1. AB + C * D /
  2. ABC + * D /
  3. ABCD + * /
  4. ABCD / * +    

ABC*D/+

iii. For a tree with n nodes, what will be the number of edges?

  1. n – edges
  2. n – 1 edges
  3. 2n edges
  4. n / 2 edges

iv. Which of the following heap trees contains nodes with values smaller or equal to the value in the parent node?

  1. Min-heap
  2. Max-heap
  3. Min-max heap
  4. Max-min heap

v. If there are n nodes in a binary tree, what will be the minimum height of the binary tree?

  1. n
  2. n – 1
  3. nlogn
  4. logn

vi. In which category does Dijkstra’s algorithm belong?

  1. Single source shortest path problem
  2. Single destination shortest path problem
  3. Single pair shortest path problem
  4. All pair shortest path problem

vii. Which of the Following is the Worst-case scenario for the quicksort algorithm?

  1. When elements are exactly partitioned into two halves
  2. When elements are randomly positioned
  3. When elements are already sorted
  4. When elements are merged by joining equal halves

viii. Which type of algorithm benefits from the reusability of code?

  1. Deterministic algorithms
  2. Non-deterministic algorithms
  3. Parallel algorithms
  4. Divide and conquer algorithm

ix. Which of the following searching algorithm has a time complexity of O(log n)?

  1. Sequential search
  2. Binary search
  3. Depth-first search
  4. Breadth-first search

x. Which of the following techniques in hashing has the consequences clustering problem?

  1. Linear probing
  2. Quadratic probing
  3. Double hashing
  4. Rehashing

Leave a Reply