Question 31

DANAT1 markNeeds review
Let

be a sorted array containing 1000 distinct integers. You perform a recursive binary search on

to find an element

. Suppose each comparison checks whether the middle element computed during the current recursive step is equal to, less than, or greater than

. The maximum number of comparisons that may have to be performed if

is not an element of

is ________ . (Answer in integer)

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

EXPLORE & PRACTISE

Paper and topic context

See where this question comes from and choose what to practise next.

2026DA

GATE DA 2026 · Paper 1

Data Science and Artificial Intelligence · Original paper archive

Section
Data Science and Artificial Intelligence
Question type
Numerical answer (NAT)
Marks
1 mark

Practise related topics

Explore more previous year questions using this question’s imported topic tags.

data science

GATE DA previous year questions

artificial intelligence

GATE DA previous year questions

computing

GATE DA previous year questions

Programming, Data Structures and Algorithms

GATE DA previous year questions

binary search

GATE DA previous year questions

Comments

Ask a question, share your approach, or help someone understand.

Log in to view the discussion

You’re not logged in. Log in or create an account to see discussions and add comments.