Singly linked list MCQsBy: Prof. Dr. Fazal Rehman | Last updated: May 14, 2025 20 Score: 0 Attempted: 0/20 Subscribe 1. : What is a singly 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 2. : What is the time complexity of inserting an element at the beginning of a singly linked list? (A) O(1) (B) O(n) (C) O(log n) (D) O(n log n) 3. : Which of the following operations requires traversing a singly linked list? (A) Inserting at the beginning (B) Deleting from the beginning (C) Accessing the last element (D) All of the above 4. : What is the time complexity of deleting the first element of a singly linked list? (A) O(1) (B) O(n) (C) O(log n) (D) O(n log n) 5. : In a singly linked list, each node contains: (A) A data part and a pointer to the previous node (B) Only a data part (C) A data part and a pointer to the next node (D) A data part and pointers to both previous and next nodes 6. : How do you traverse a singly linked list? (A) By following the pointers from one node to the next (B) By using an index (C) By accessing elements directly (D) By using a stack 7. : Which of the following is the correct way to delete the node after a given node in a singly linked list? (A) Adjust the pointer of the given node to skip the next node (B) Adjust the 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 singly 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 singly linked list? (A) Set the new node’s pointer to the next node, then adjust the given node’s pointer to the new node (B) Set the given node’s pointer to the new node, then set the new node’s pointer to the next node (C) Set the new node’s pointer to the previous node (D) Set the new node’s pointer to the first node 10. : Which of the following is true about the head node in a singly 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 singly linked list if the tail pointer is not maintained? (A) O(1) (B) O(log n) (C) O(n) (D) O(n log n) 12. : What is the key disadvantage of using a singly linked list? (A) It requires more memory than an array (B) It does not allow random access of elements (C) It is difficult to implement (D) It is less efficient for large datasets 13. : Which of the following operations is not possible with a singly linked list? (A) Insertion at the end (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 singly 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 singly linked lists? (A) They can be traversed in both directions (B) They use more memory than doubly linked lists (C) They allow efficient insertion and deletion from both ends (D) They allow efficient insertion and deletion from the beginning 16. : How do you find the length of a singly 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 singly 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 singly 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 singly 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 singly 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:insert node at the middle of Singly Linked ListCircular linked list implementation in C++ (Singly)Comparison between X-Linked Traits and Y- Linked TraitsCircular linked list implementation in C++ (Doubly link list)Insert a node at the end of Singly Link ListSingly Link List using Class in C++