Skip to main content

10 PYQ related to Data Structures

PYQ related to Data Structures for UGC NET, SET, GATE, ASSISTANT PROFESSOR COMPUTER SCIENCE

  1. GATE CS 2020
    Which of the following data structures is best suited for implementing a priority queue?
    A) Stack
    B) Queue
    C) Heap
    D) Linked List
    Answer: C) Heap
    Explanation: A heap allows efficient insertions and deletion of the highest priority element in O(log n) time.

  2. UGC NET 2021
    Which data structure uses the concept of LIFO (Last In, First Out)?
    A) Queue
    B) Stack
    C) Linked List
    D) Tree
    Answer: B) Stack
    Explanation: A stack follows the LIFO principle, where the last element inserted is the first to be removed.

  3. ISRO Scientist 2018
    Which traversal technique in a binary tree uses a queue data structure?
    A) In-order Traversal
    B) Pre-order Traversal
    C) Post-order Traversal
    D) Level-order Traversal
    Answer: D) Level-order Traversal
    Explanation: Level-order traversal of a binary tree uses a queue to process nodes level by level.

  4. GATE CS 2019
    Which of the following data structures is not suitable for binary search?
    A) Sorted Array
    B) Linked List
    C) Balanced Binary Search Tree (BST)
    D) Skip List
    Answer: B) Linked List
    Explanation: A linked list does not provide direct access to the middle element, making binary search inefficient.

  5. NIELIT Scientist B 2020
    Which data structure efficiently supports insertions and deletions from both ends?
    A) Stack
    B) Queue
    C) Deque
    D) Priority Queue
    Answer: C) Deque
    Explanation: A deque (double-ended queue) allows insertion and deletion from both ends efficiently.

  6. GATE CS 2017
    Which data structure is used in the implementation of DFS (Depth First Search)?
    A) Queue
    B) Stack
    C) Priority Queue
    D) Hash Table
    Answer: B) Stack
    Explanation: DFS uses a stack (either explicitly or through recursion) to explore nodes.

  7. UGC NET 2020
    Which of the following operations is most efficiently performed by a hash table?
    A) Sorting
    B) Searching
    C) Traversing
    D) Merging
    Answer: B) Searching
    Explanation: Hash tables provide O(1) time complexity for searching in the average case.

  8. GATE CS 2018
    Which data structure is most suitable for evaluating arithmetic expressions in postfix notation?
    A) Queue
    B) Stack
    C) Linked List
    D) Tree
    Answer: B) Stack
    Explanation: Postfix expressions are evaluated using a stack, where operands are pushed, and operators are applied to the top elements.

  9. NIELIT Scientist B 2021
    Which of the following data structures allows efficient merging of two sorted lists?
    A) Array
    B) Linked List
    C) Binary Search Tree
    D) AVL Tree
    Answer: B) Linked List
    Explanation: Two sorted linked lists can be merged efficiently in O(n + m) time by adjusting pointers.

  10. GATE CS 2021
    Which of the following is the most suitable data structure for implementing Dijkstra’s shortest path algorithm?
    A) Stack
    B) Queue
    C) Priority Queue
    D) Deque
    Answer: C) Priority Queue
    Explanation: Dijkstra’s algorithm uses a priority queue to pick the vertex with the minimum distance efficiently.


Comments

Popular posts from this blog

Top 5 Safe Chat Apps for Kids with Parental Controls

Now a days kids are growing up with technology at their fingertips. While communication apps help children stay connected with family and friends, safety remains a top concern for parents. Unregulated platforms can expose children to inappropriate content, online predators, and cyberbullying. That’s why choosing a kid-friendly chat app with parental controls is essential. To help parents find the best options, we’ve compiled a list of the top five safest chat apps for kids that offer safe and controlled environment. 1. Messenger Kids (By Meta) Best for: Safe video calls and text messaging with parental supervision Features: Parents approve all contacts No ads or in-app purchases Fun filters, stickers, and games Monitored messaging and activity reports Why It’s Safe: Messenger Kids is designed for children under 13 and requires parental approval for every contact. Parents can monitor chats and control screen time through the Parent Dashboard. Download Messenger Kids 2...

10 Routing Protocol MCQ

10 multiple-choice questions on Routing protocol s  with explanations, useful for UGC NET, SET, GATE, ISRO, and other competitive exams . Question 1: Purpose of Routing Protocols Q1: What is the primary purpose of a routing protocol? A) To assign IP addresses to devices B) To determine the best path for data packets to reach their destination C) To encrypt data during transmission D) To physically connect different networks Answer: B) To determine the best path for data packets to reach their destination Explanation: Routing protocols help routers determine the most efficient path for data transmission across a network, ensuring fast and reliable communication. Question 2: Classification of Routing Protocols Q2: Routing protocols can be broadly classified into which two main categories? A) TCP and UDP B) Distance Vector and Link-State C) IPv4 and IPv6 D) Static and Dynamic Answer: B) Distance Vector and Link-State Explanation: Routing prot...

10 Distance Vector and Link-State Routing MCQ

  10 multiple-choice questions  on  Distance Vector and Link-State Routing with explanations, useful for  UGC NET, SET, GATE, ISRO, and other competitive exams . Question 1: Basic Concept of Distance Vector Routing Q1: In a distance vector routing protocol, how do routers share routing information? A) By flooding the entire network with routing updates B) By periodically exchanging routing tables with their immediate neighbors C) By using a link-state database to determine the shortest path D) By dynamically updating paths based on link failure reports Answer: B) By periodically exchanging routing tables with their immediate neighbors Explanation: In Distance Vector Routing, routers share their routing tables with neighbors at regular intervals, leading to a simple but slow convergence mechanism. Question 2: Example of Distance Vector Routing Protocol Q2: Which of the following is an example of a Distance Vector routing protocol? A) OSPF ...