Graph representation (adjacency matrix, adjacency list) MCQsBy: Prof. Dr. Fazal Rehman | Last updated: May 15, 2025 10 Score: 0 Attempted: 0/10 Subscribe 1. What is an adjacency matrix? (A) A 1D array representing graph edges (B) A 2D array representing graph connections (C) A list of edges (D) A tree structure 2. Which representation is more space-efficient for sparse graphs? (A) Adjacency matrix (B) Adjacency list (C) Both are equally efficient (D) None of the above 3. In an adjacency matrix, what does a value of 1 indicate? (A) No edge exists (B) An edge exists (C) The graph is directed (D) The graph is weighted 4. What is the time complexity of checking for the existence of an edge using an adjacency matrix? (A) O(1) (B) O(n) (C) O(n²) (D) O(log n) 5. What is the primary disadvantage of using an adjacency matrix for graph representation? (A) It is complex to implement (B) It uses too much memory for sparse graphs (C) It does not support weighted graphs (D) It cannot represent directed graphs 6. Which of the following is true about adjacency lists? (A) They require more memory than adjacency matrices (B) They can represent both directed and undirected graphs (C) They are slower for edge existence checks (D) They cannot represent weighted graphs 7. For a complete graph with n vertices, what is the size of the adjacency matrix? (A) n (B) n² (C) n(n−1)/2 (D) 2n 8. How can you represent weights in an adjacency matrix? (A) Use negative numbers (B) Replace 1s with the weight values (C) Add an extra row (D) Use a separate array 9. What is the time complexity of traversing all vertices in an adjacency list? (A) O(1) (B) O(n) (C) O(n + e) where e is the number of edges (D) O(n²) 10. Which representation is more suitable for dense graphs? (A) Adjacency list (B) Adjacency matrix (C) Edge list (D) None of the above 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:Graph Representation with adjacency matrix and adjacency ListFixed-Point vs Floating-Point Representation MCQsWhich data structure is used to implement the array, stack, link list, queue, tree and GraphDivide the Zero Matrix A=[(0,0),(0,0)]A=[(0,0),(0,0)] by the Zero Matrix B=[(0,0),(0,0)]B=[(0,0),(0,0)].Multiply Matrix A (1x3) by Matrix B (3x1)Divide Matrix A = [(6, 3), (9, 12)] by Matrix B = [(3, 1), (3, 4)]