Data Structures — Set 5
Computers · डेटा संरचनाएं · Questions 41–50 of 50
Which 'GEMS' data structure is essential for performing a 'Binary Search'?
Correct Answer: B. Sorted Array
Binary Search requires data to be in a sorted order within an array to function correctly. It works by repeatedly dividing the search interval in half to find a target value. This method is much faster than checking every element one by one.
What is the 'GEMS' name for a linked list where the last node points back to the first node?
Correct Answer: A. Circular Linked List
In a Circular Linked List, there is no 'null' ending, creating a continuous loop of data. This is useful for applications that need to cycle through a list repeatedly, like a round-robin task scheduler. It allows for traversal of the entire list starting from any node.
In a 'GEMS' Binary Search Tree, where are values smaller than the root node stored?
Correct Answer: B. In the left subtree
A Binary Search Tree is organized such that the left child is always smaller and the right child is always larger than the parent. This specific ordering allows for highly efficient data searching and sorting. It turns a linear list into a searchable hierarchy.
Which 'GEMS' data structure is primarily used for managing 'Recursion' in programming?
Correct Answer: B. Stack
The system stack keeps track of the return addresses and local variables for each recursive function call. As the recursion goes deeper, more information is pushed onto the stack. Once a base case is hit, the function calls are resolved by popping from the stack.
What 'GEMS' term is used to describe the process of visiting every node in a tree exactly once?
Correct Answer: C. Traversal
Tree traversal is the systematic way of moving through a tree to process the data held in its nodes. Common methods include In-order, Pre-order, and Post-order traversals. These methods determine the sequence in which information is retrieved from the tree.
Which 'GEMS' linear structure is used to implement 'Depth First Search' (DFS) in a graph?
Correct Answer: B. Stack
DFS uses a Stack to explore as far as possible along each branch before backtracking. It is a fundamental algorithm for tasks like solving mazes or detecting cycles in a network. In contrast, Breadth First Search (BFS) utilizes a Queue.
What 'GEMS' data structure is used to represent the 'Follower' relationship on social media?
Correct Answer: C. Graph
Social networks are modeled as Graphs where users are nodes and the 'follow' action is a directed edge. This allows for complex analysis of connections, groups, and content flow. Graph databases are specifically designed to handle this type of interconnected data.
In a 'GEMS' Doubly Linked List, how many pointers does each node typically have?
Correct Answer: B. Two
Each node in a doubly linked list has a pointer to the next node and a pointer to the previous node. This allows the user to traverse the list in both directions, offering more flexibility than a single linked list. However, it requires more memory to store the additional pointer.
Which 'GEMS' data structure is the basis for a 'First-In-First-Out' (FIFO) buffer?
Correct Answer: B. Queue
A FIFO buffer ensures that the data is processed in the exact order it was received. This is critical for data stream management and networking protocols. The Queue data structure is the standard implementation for this behavior.
Which 'GEMS' term describes an array where the number of elements can be changed during execution?
Correct Answer: B. Dynamic Array
Dynamic arrays can resize themselves automatically when they become full, providing more flexibility for data storage. They are used in high-level programming languages to handle lists where the final size is unknown. This overcomes the major limitation of traditional static arrays.