Operations: traversal, insertion, deletion MCQsBy: Prof. Dr. Fazal Rehman | Last updated: May 14, 2025 20 Score: 0 Attempted: 0/20 Subscribe 1. : What is traversal in the context of data structures? (A) Adding an element to the data structure (B) Removing an element from the data structure (C) Accessing and processing each element of the data structure (D) Sorting the elements of the data structure 2. : Which traversal technique visits the left subtree, then the root, and finally the right subtree in a binary tree? (A) Preorder traversal (B) Inorder traversal (C) Postorder traversal (D) Level order traversal 3. : Which traversal method is used in depth-first search (DFS) of a graph? (A) Inorder traversal (B) Preorder traversal (C) Postorder traversal (D) Any of the above 4. : In a linked list, which operation requires traversal to reach the desired position? (A) Insertion at the head (B) Deletion at the head (C) Insertion at the tail (D) All of the above 5. : What is the time complexity of traversing an array of size n? (A) O(1) (B) O(log n) (C) O(n) (D) O(n^2) 6. : 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^2) 7. : In an array, what is the time complexity of inserting an element at the end? (A) O(1) (B) O(n) (C) O(log n) (D) O(n^2) 8. : What is the time complexity of inserting an element at a specific position in an array of size n? (A) O(1) (B) O(log n) (C) O(n) (D) O(n^2) 9. : In a binary search tree (BST), what is the average time complexity of inserting an element? (A) O(1) (B) O(log n) (C) O(n) (D) O(n^2) 10. : In a heap, what is the time complexity of inserting an element? (A) O(1) (B) O(log n) (C) O(n) (D) O(n^2) 11. : 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^2) 12. : In an array, what is the time complexity of deleting an element from a specific position? (A) O(1) (B) O(log n) (C) O(n) (D) O(n^2) 13. : What is the time complexity of deleting an element from the end of an array of size n? (A) O(1) (B) O(n) (C) O(log n) (D) O(n^2) 14. : In a binary search tree (BST), what is the average time complexity of deleting an element? (A) O(1) (B) O(log n) (C) O(n) (D) O(n^2) 15. : What is the time complexity of deleting the root element in a max heap? (A) O(1) (B) O(log n) (C) O(n) (D) O(n^2) 16. : Which data structure allows insertion, deletion, and traversal in O(1) time complexity? (A) Array (B) Singly linked list (C) Doubly linked list (D) None of the above 17. : Which of the following data structures supports O(1) time complexity for both insertion and deletion at the beginning? (A) Array (B) Stack (C) Queue (D) Singly linked list 18. : Which traversal method is typically used to display elements of a binary search tree in ascending order? (A) Preorder (B) Inorder (C) Postorder (D) Level order 19. : In which data structure does insertion and deletion take O(1) time but traversal takes O(n) time? (A) Stack (B) Queue (C) Linked list (D) Binary search tree 20. : What is the time complexity of inserting an element in the middle of a linked list? (A) O(1) (B) O(n) (C) O(log n) (D) O(n log n) 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:Heap operations (insertion, deletion, heapify) MCQsRelational algebra, Union Operations, Binary Operations, Difference, Cartesian product Deletion at the start, middle and end of the LinkedList in a single program in C++Graph traversal algorithms (DFS, BFS) MCQsTree traversal methods (in-order, pre-order, post-order) MCQsInsertion sort MCQs