Doubly linked list MCQsBy: Prof. Dr. Fazal Rehman | Last updated: May 14, 2025 20 Score: 0 Attempted: 0/20 Subscribe 1. : What is a doubly linked list? (A) A data structure where each node points to the next node (B) A data structure where each node points to both the previous and next nodes (C) A data structure where each node points to the previous node (D) A circular data structure where nodes point to each other Answer: (B) A data structure where each node points to both the previous and next nodes 2. : What is the time complexity of inserting an element at the beginning of a doubly linked list? (A) O(1) (B) O(n) (C) O(log n) (D) O(n log n) 3. : Which of the following operations requires traversal in a doubly linked list? (A) Inserting at the beginning (B) Deleting from the beginning (C) Accessing the last element (D) Inserting at the end if the tail pointer is maintained 4. : What is the time complexity of deleting the first element of a doubly linked list? (A) O(1) (B) O(n) (C) O(log n) (D) O(n log n) 5. : In a doubly linked list, each node contains: (A) A data part and a pointer to the previous node (B) A data part and a pointer to the next node (C) A data part and pointers to both the previous and next nodes (D) Only a data part 6. : How do you traverse a doubly linked list from the end to the beginning? (A) By following the previous pointers from the tail node to the head node (B) By following the next pointers from the tail node to the head node (C) By using an index (D) By accessing elements directly 7. : Which of the following is the correct way to delete a node after a given node in a doubly linked list? (A) Adjust the next pointer of the given node to skip the next node and adjust the previous pointer of the node after the next node (B) Adjust the next pointer of the next node to point to the given node (C) Delete the given node (D) None of the above 8. : What is the time complexity of searching for an element in a doubly linked list? (A) O(1) (B) O(n) (C) O(log n) (D) O(n log n) 9. : How do you insert a new node after a given node in a doubly linked list? (A) Set the new node’s next pointer to the next node and adjust the given node’s next pointer to the new node, then adjust the new node’s previous pointer and the next node’s previous pointer (B) Set the given node’s next pointer to the new node and adjust the new node’s next pointer to the next node (C) Set the new node’s previous pointer to the previous node (D) Set the new node’s next pointer to the first node 10. : Which of the following is true about the head node in a doubly linked list? (A) It contains the largest value in the list (B) It points to the first node of the list (C) It points to the last node of the list (D) It is always null 11. : What is the time complexity of inserting an element at the end of a doubly linked list if the tail pointer is maintained? (A) O(1) (B) O(n) (C) O(log n) (D) O(n log n) 12. : What is the key advantage of using a doubly linked list over a singly linked list? (A) It requires less memory (B) It allows traversal in both directions (C) It is easier to implement (D) It has faster access to elements 13. : Which of the following operations is possible with a doubly linked list but not with a singly linked list? (A) Insertion at the beginning (B) Deletion from the beginning (C) Traversing in reverse order (D) Searching for an element 14. : What is the time complexity of accessing the nth element in a doubly linked list? (A) O(1) (B) O(n) (C) O(log n) (D) O(n log n) 15. : Which of the following statements is true about doubly linked lists? (A) They use less memory than singly linked lists (B) They allow efficient insertion and deletion from both ends (C) They are less efficient for large datasets (D) They do not allow random access of elements 16. : How do you find the length of a doubly linked list? (A) By traversing the list and counting the nodes (B) By accessing the length property (C) By using a counter variable during insertion and deletion (D) Both a and c 17. : In a doubly linked list, what is the term used for the last node? (A) Head (B) Tail (C) End (D) Final 18. : What happens if you try to delete a node from an empty doubly linked list? (A) The list becomes undefined (B) The list becomes null (C) An error occurs (D) Nothing happens 19. : Which of the following best describes a node in a doubly linked list? (A) It contains a value and two pointers (B) It contains a value and a pointer to the next node (C) It contains only a value (D) It contains a value and a pointer to the previous node 20. : How do you delete a doubly linked list? (A) Set the head to null (B) Free each node one by one (C) Use a loop to delete all nodes (D) Both b and c Data Structures MCQs Basic Concepts Introduction to Data Structures Abstract Data Types (ADT) MCQs Complexity Analysis MCQs Time complexity MCQs Space complexity MCQs Big O, Big Ω, Big Θ notations MCQs Linear Data Structures MCQs Arrays MCQs One-dimensional arrays MCQs Multi-dimensional arrays MCQs Operations: traversal, insertion, deletion MCQs Linked Lists MCQs Singly linked list MCQs Doubly linked list MCQs Circular linked list MCQs Stacks MCQs Stack operations (push, pop, peek) MCQs Applications of stacks (expression evaluation, recursion) MCQs Queues MCQs Queue operations (enqueue, dequeue, front, rear) MCQs Types: Simple queue, circular queue, priority queue, deque MCQs Non-Linear Data Structures MCQs Trees MCQs Binary trees MCQs Binary Search Trees (BST) MCQs AVL Trees MCQs B-trees and B+ trees MCQs Tree traversal methods (in-order, pre-order, post-order) MCQs Heaps MCQs Min-heap MCQs Max-heap MCQs Heap operations (insertion, deletion, heapify) MCQs Applications of heaps (priority queues, heap sort) MCQs Graphs MCQs Graph representation (adjacency matrix, adjacency list) MCQs Graph traversal algorithms (DFS, BFS) MCQs Shortest path algorithms (Dijkstra’s, Bellman-Ford) MCQs Minimum Spanning Tree (Kruskal’s, Prim’s) MCQs Hashing MCQs MCQs Hash Tables Hash functions MCQs Collision resolution techniques (chaining, open addressing) MCQs Applications of hashing MCQs Sorting and Searching Algorithms MCQs Sorting Algorithms MCQs Bubble sort MCQs Selection sort MCQs Insertion sort MCQs Merge sort MCQs Quick sort MCQs Heap sort MCQs Searching Algorithms MCQs Linear search MCQs Binary search MCQs Interpolation search MCQs Miscellaneous Memory Management in data structures MCQs Dynamic memory allocation MCQs Garbage collection MCQs String Manipulation Algorithms MCQs Pattern matching (KMP, Rabin-Karp) MCQs String hashing MCQs Data Structures MCQs 1 Data Structures MCQs 2 Data Structures MCQs 3 Data Structures MCQs 4 Data Structures MCQs 5 Stacks Solved MCQs Queues MCQs pointer mcqs Array MCQs Related Posts:Circular linked list implementation in C++ (Doubly link list)Comparison between X-Linked Traits and Y- Linked TraitsDoubly Link List C++ Easy CodeDoubly Link List using Class in C++Insert at the end in Doubly Link List C++ - Easy CodeCircular linked list MCQs