Search
Question: If a binary search is performed on an array of size 16, how many comparisons will be made ..
Question: Which of the following statements about binary search is true?Options: It can be used on l..
Question: What modification is needed to perform binary search on a rotated sorted array?Options: No..
Question: Which data structure is most suitable for implementing binary search?Options: Linked ListA..
Question: What is the best-case time complexity of binary search?Options: O(n)O(log n)O(1)O(n log n)..
Question: Which of the following applications can utilize binary search?Options: Finding the first o..
Question: If a binary search is performed on an array of size 16, how many comparisons will it take ..
Question: What is the main advantage of binary search over linear search?Options: It is easier to im..
Question: In which scenario is binary search NOT applicable?Options: Finding an element in a sorted ..
Question: Which of the following is a prerequisite for using binary search?Options: The array must b..
Question: Which of the following modifications can be made to binary search to find the first occurr..
Question: What is the result of performing binary search on an array with duplicate values?Options: ..
Question: In a binary search tree (BST), how does binary search differ from searching in a sorted ar..
Question: What happens if binary search is applied to a linked list?Options: It works efficientlyIt ..
Question: If a binary search is performed on a sorted array of size n, what is the space complexity?..
Question: Which of the following is a key advantage of binary search over linear search?Options: Sim..
Question: What is the maximum number of comparisons needed to find an element in an array of size 10..
Question: In binary search, if the target value is not found, what will be the return value?Options:..
Question: In binary search, if the target is less than the middle element, what should be the next s..
Question: What is the average time complexity of binary search?Options: O(n)O(log n)O(n log n)O(1)Co..
Question: Which of the following is a prerequisite for applying binary search?Options: The array mus..
Question: What is the worst-case scenario for the number of comparisons made by binary search?Option..
Question: In a binary search algorithm, what happens if the middle element is equal to the target?Op..
Question: What is the main advantage of using binary search over linear search?Options: Binary searc..
Question: If the target value is not present in the array, what will binary search return?Options: T..
Question: Which of the following conditions must be true for binary search to work?Options: Array mu..
Question: What is a common use of BFS in networking?Options: Finding the maximum flow in a network.B..
Question: In a tree structure, which traversal method is typically used for searching?Options: BFSDF..
Question: Which of the following is a real-world application of DFS?Options: Finding the shortest pa..
Question: Which of the following statements about BFS and DFS is false?Options: BFS can find the sho..