10. In binary search, in the part of the code where the Key is compared with Array/mid (e. statement if (key= Array[mid]), if key> Array[mid] then which of the followings will happen: a) The 'Right' range variable is set to 'mid-1. b) The 'Left' range variable is set to 'mid-1. c) The 'Right' range variable is set to 'mid +1. d) The Left' range variable is set to 'mid' +1. 11. The complexity of MergeSort algorithm is a) O(n) b) O(log n) c) O(n) d) O(n log n) 12. The complexity of Binary search algorithm is a) O(n) b) O(log n) (c) O(n) d) O(n log n)
10. In binary search, in the part of the code where the Key is compared with Array/mid (e. statement if (key= Array[mid]), if key> Array[mid] then which of the followings will happen: a) The 'Right' range variable is set to 'mid-1. b) The 'Left' range variable is set to 'mid-1. c) The 'Right' range variable is set to 'mid +1. d) The Left' range variable is set to 'mid' +1. 11. The complexity of MergeSort algorithm is a) O(n) b) O(log n) c) O(n) d) O(n log n) 12. The complexity of Binary search algorithm is a) O(n) b) O(log n) (c) O(n) d) O(n log n)
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 12PE
Related questions
Question
Try to answer maximum questions and simple explanation
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps