Загрузка...

GATE CS 2017 Set 1 | Q 48: Let A be an array of 31 numbers consisting of a sequence of 0's followed

GATE CS 2017 Set 1 | Question: 48
Let A be an array of 31 numbers consisting of a sequence of 0's followed by a sequence of 1's. The problem is to find the smallest index i such that A[i] is 1 by probing the minimum number of locations in A. The worst case number of probes performed by an optimal algorithm is ________.

Ans : 5
----------------------------------------------------
Subscribe my channel for more updates https://www.youtube.com/monalisacs
----------------------------------------------------------
Join Telegram GATE CSE study group: https://t.me/MonalisaCSE
----------------------------------------------------------------
Algorithm Lectures :https://www.youtube.com/playlist?list=PL767-rEuXhcNz3RzupBowAjH2VIxCiY4z
Algorithm GATE PYQ: https://www.youtube.com/playlist?list=PL767-rEuXhcPvbsxbBWbDSlRZ4e6kAVve
----------------------------------------------------------------
Compiler Design Lectures :https://www.youtube.com/watch?v=THpeYyp0gwY&list=PL767-rEuXhcOgCrFXRxyvfO_4INJET0f0&index=1
Compiler Design PYQ :https://www.youtube.com/watch?v=THpeYyp0gwY&list=PL767-rEuXhcOVm9ABkyap0uSyjFz6c5cS&index=1
----------------------------------------------------------------------
Theory Of Computation Lectures https://www.youtube.com/watch?v=vDJjYGui3Ho&list=PL767-rEuXhcPQWMuHXOCZzj5PqF9YBVZt
TOC GATE PYQ: https://www.youtube.com/watch?v=K5wIww1OnCY&list=PL767-rEuXhcN7sn9TCRxhmvDpG7RLT3UK
-------------------------------------------------------------------
Data Structure Lecture: https://www.youtube.com/watch?v=mYDsGejk3zg&list=PL767-rEuXhcMiMbX4IU_oqWshY6z8Rc7j
Data Structure PYQ: https://www.youtube.com/watch?v=mYDsGejk3zg&list=PL767-rEuXhcOWUPgW1RrIkUKAle1YBdh1
-----------------------------------------------------------------------
#gate2023 #gate_cs #gate #algorithm #binarysearch

Видео GATE CS 2017 Set 1 | Q 48: Let A be an array of 31 numbers consisting of a sequence of 0's followed канала Monalisa CS
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять