GATE DA 2024 | Question: 30 Let 𝐹(𝑛) denote the maximum number of comparisons made while searching

preview_player
Показать описание
GATE DA 2024 | Question: 30
Let 𝐹(𝑛) denote the maximum number of comparisons made while searching for an entry in a sorted array of size 𝑛 using binary search.Which ONE of the following options is TRUE?
(A) 𝐹(𝑛) = 𝐹(⌊𝑛/2⌋) + 1 (B) 𝐹(𝑛) = 𝐹(⌊𝑛/2⌋) + 𝐹(⌈𝑛/2⌉)
(C) 𝐹(𝑛) = 𝐹(⌊𝑛/2⌋) (D) 𝐹(𝑛) = 𝐹(𝑛 - 1) + 1

Ans: (A)

0:00 Intro & Question
0:25 Solution

----------------------------------------------------
----------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------------
-------------------------------------------------------------------
-----------------------------------------------------------------------
#gate_cs #gate #aptitude #generalaptitude #gate2024 #gateda #monalisacs #datascience #treetraversal
Рекомендации по теме