GATE Exam | Aptitude Questions | GATE Syllabus | GATE Result | Mock Test | GATE Preparation
0 votes

Which of the following is correct recurrence for worst case of Binary Search?

A

T(n) = 2T(n/2) + O(1) and T(1) = T(0) = O(1)

B

T(n) = T(n-1) + O(1) and T(1) = T(0) = O(1)

C

T(n) = T(n/2) + O(1) and T(1) = T(0) = O(1)

D

T(n) = T(n-2) + O(1) and T(1) = T(0) = O(1)

asked in Searching, sorting by gate

1 Answer

0 votes

T(n) = T(n/2) + O(1) and T(1) = T(0) = O(1)

answered by gate

Related questions

The best answer to any question