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

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. In a full binary tree if there are L leaves, then total number of nodes N are?

  • (A) N = 2*L
  • (B) N = L + 1
  • (C) N = L – 1
  • (D) N = 2*L – 1

A

Admin • 833.24K Points
Coach

Q. Which of the following is incorrect with respect to binary trees?

  • (A) Let T be a binary tree. For every k ≥ 0, there are no more than 2k nodes in level k
  • (B) Let T be a binary tree with λ levels. Then T has no more than 2λ – 1 nodes
  • (C) Let T be a binary tree with N nodes. Then the number of levels is at least ceil(log (N + 1))
  • (D) Let T be a binary tree with N nodes. Then the number of levels is at least floor(log (N + 1))

A

Admin • 833.24K Points
Coach

Q. Which of the following is false about a binary search tree?

  • (A) The left child is always lesser than its parent
  • (B) The right child is always greater than its parent
  • (C) The left and right sub-trees should also be binary search trees
  • (D) In order sequence gives decreasing order of elements

A

Admin • 833.24K Points
Coach

Q. What is the speciality about the inorder traversal of a binary search tree?

  • (A) It traverses in a non increasing order
  • (B) It traverses in an increasing order
  • (C) It traverses in a random fashion
  • (D) It traverses based on priority of the node

A

Admin • 833.24K Points
Coach

Q. What are the worst case and average case complexities of a binary search tree?

  • (A) O(n), O(n)
  • (B) O(logn), O(logn)
  • (C) O(logn), O(n)
  • (D) O(n), O(logn)

A

Admin • 833.24K Points
Coach

Q. What are the conditions for an optimal binary search tree and what is its advantage?

  • (A) The tree should not be modified and you should know how often the keys are accessed, it improves the lookup cost
  • (B) You should know the frequency of access of the keys, improves the lookup time
  • (C) The tree can be modified and you should know the number of elements in the tree before hand, it improves the deletion time
  • (D) The tree should be just modified and improves the lookup time

A

Admin • 833.24K Points
Coach

Q. Which of the following is not the self balancing binary search tree?

  • (A) AVL Tree
  • (B) 2-3-4 Tree
  • (C) Red – Black Tree
  • (D) Splay Tree

A

Admin • 833.24K Points
Coach

Q. Consider a standard Circular Queue 'q' implementation (which has the same condition for Queue Full and Queue Empty) whose size is 11 and the elements of the queue are q[0], q[1], q[2].....,q[10]. The front and rear pointers are initialized to point at q[2] . In which position will the ninth element be added?

  • (A) q[0]
  • (B) q[1]
  • (C) q[9]
  • (D) q[10]

A

Admin • 833.24K Points
Coach

Q. Which of the following statement is true?
i) Using singly linked lists and circular list, it is not possible to traverse the list backwards.
ii) To find the predecessor, it is required to traverse the list from the first node in case of singly linked list.

  • (A) i-only
  • (B) ii-only
  • (C) both i and ii
  • (D) none of the above

A

Admin • 833.24K Points
Coach

Q. If a simple graph G, contains n vertices and m edges, the number of edges in the Graph G'(Complement of G) is

  • (A) (n*n-n-2*m)/2
  • (B) (n*n+n+2*m)/2
  • (C) (n*n-n-2*m)/2
  • (D) (n*n-n+2*m)/2

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ