Computer Science, asked by neerugarg40, 1 month ago

What is the worst case Space Complexity of Recursive Binary Search and Iterative Binary Search​

Answers

Answered by SAMOBJUPRAVEEN
1

Answer:

Explanation:

The major difference between the iterative and recursive version of Binary Search is that the recursive version has a space complexity of O(log N) while the iterative version has a space complexity of O(1).

Answered by munmundutta42
0

Answer:

Time and Space complexity

The time complexity of the binary search algorithm is O(log n). The best-case time complexity would be O(1) when the central index would directly match the desired value. The worst-case scenario could be the values at either extremity of the list or values not in the list.

Similar questions