23. Among the given options, which search algorithm requires less memory?
A. Optimal Search
B. Depth-First Search
C. Breadth-First Search
D. Linear Search
Answer . D. Linear Search
Tag . 2 Data Structure and Algorithms 3
57. Imagine you're implementing an online multiplayer game- Players' scores need to be tracked efficiently- Which type of heap ensures that the player with the highest score is always at the root?
A- Min heap
B- Fibonacci heap
C- Binary heap
D- Max heap
Answer . D. Max heap
Tag . 2 Data Structure and Algorithms 3
66. Let's consider the scenario where you're building a spell-checker application that needs to efficiently search for words in a dictionary- In this context, what is the time complexity for searching an element in a balanced Binary Search Tree (BST)?
A- O(log n)
B- O(1)
C- O(n log n)
D- O(n)
Answer . A. O(log n)
Tag . 2 Data Structure and Algorithms 3
72- Suppose you're implementing a shopping cart functionality for an online platform- Each item in the cart is connected to the next one in a circular manner- What is the disadvantage of using a circular linked list in this scenario?
A- Last item points to the first item
B- Time-consuming for insertion and deletion
C- It is possible to get into an infinite loop
D- Requires more memory space
Answer . C. It is possible to get into an infinite loop
Tag . 2 Data Structure and Algorithms 3
| Question | Answer |
|---|---|
| Q1. Among the given options, which search algorithm requires less memory? \n A. Optimal Search \n B. Depth-First Search \n C. Breadth-First Search \n D. Linear Search | Answer . D. Linear Search |
| Q2. Imagine you're implementing an online multiplayer game. Players' scores need to be tracked efficiently. Which type of heap ensures that the player with the highest score is always at the root? \n A. Min heap \n B. Fibonacci heap \n C. Binary heap \n D. Max heap | Answer . D. Max heap |
| Q3. Let's consider the scenario where you're building a spell-checker application that needs to efficiently search for words in a dictionary. In this context, what is the time complexity for searching an element in a balanced Binary Search Tree (BST)? \n A. O(log n) \n B. O(1) \n C. O(n log n) \n D. O(n) | Answer . A. O(log n) |
| Q4. Suppose you're implementing a shopping cart functionality for an online platform. Each item in the cart is connected to the next one in a circular manner. What is the disadvantage of using a circular linked list in this scenario? \n A. Last item points to the first item \n B. Time-consuming for insertion and deletion \n C. It is possible to get into an infinite loop \n D. Requires more memory space | Answer . C. It is possible to get into an infinite loop |