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

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. What is the space complexity for deleting a linked list?

  • (A) O(1)
  • (B) O(n)
  • (C) Either O(1) or O(n)
  • (D) O(logn)

A

Admin • 833.24K Points
Coach

Q. Which of these is not an application of linked list?

  • (A) To implement file systems
  • (B) For separate chaining in hash-tables
  • (C) To implement non-binary trees
  • (D) Random Access of elements

A

Admin • 833.24K Points
Coach

Q. Which of the following is false about a doubly linked list?

  • (A) We can navigate in both the directions
  • (B) It requires more space than a singly linked list
  • (C) The insertion and deletion of a node take a bit longer
  • (D) Implementing a doubly linked list is easier than singly linked list

A

Admin • 833.24K Points
Coach

Q. What is the worst case time complexity of inserting a node in a doubly linked list?

  • (A) O(nlogn)
  • (B) O(logn)
  • (C) O(n)
  • (D) O(1)

A

Admin • 833.24K Points
Coach

Q. What is the time complexity of searching for an element in a circular linked list?

  • (A) O(n)
  • (B) O(nlogn)
  • (C) O(1)
  • (D) O(n2)

A

Admin • 833.24K Points
Coach

Q. Which of the following application makes use of a circular linked list?

  • (A) Undo operation in a text editor
  • (B) Recursive function calls
  • (C) Allocating CPU to resources
  • (D) Implement Hash Tables

A

Admin • 833.24K Points
Coach

Q. Which of the following is false about a circular linked list?

  • (A) Every node has a successor
  • (B) Time complexity of inserting a new node at the head of the list is O(1)
  • (C) Time complexity for deleting the last node is O(n)
  • (D) We can traverse the whole circular linked list by starting from any point

A

Admin • 833.24K Points
Coach

Q. Consider a small circular linked list. How to detect the presence of cycles in this list effectively?

  • (A) Keep one node as head and traverse another temp node till the end to check if its ‘next points to head
  • (B) Have fast and slow pointers with the fast pointer advancing two nodes at a time and slow pointer advancing by one node at a time
  • (C) Cannot determine, you have to pre-define if the list contains cycles
  • (D) Circular linked list itself represents a cycle. So no new cycles cannot be generated

A

Admin • 833.24K Points
Coach

Q. A linear collection of data elements where the linear node is given by means of pointer is called?

  • (A) Linked list
  • (B) Node list
  • (C) Primitive list
  • (D) Unordered list

A

Admin • 833.24K Points
Coach

Q. What should be done when a left parenthesis ‘(‘ is encountered?

  • (A) It is ignored
  • (B) It is placed in the output
  • (C) It is placed in the operator stack
  • (D) The contents of the operator stack is emptied

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