Given an array arr = {45, 77, 89, 90, 94, 99, 100} and key = 100, what are the…

PYQ Tech Mahindra Hiring Assessment 2024

Given an array arr = {45, 77, 89, 90, 94, 99, 100} and key = 100, what are the mid values (corresponding array elements) generated in the first and second iterations of a standard iterative binary search?

  1. A.

    90 and 99

  2. B.

    90 and 100

  3. C.

    89 and 94

  4. D.

    94 and 99

Attempted by 49 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…