Binary Search (Sorted Array) - O(log n) [ Best EXPLAINATION Algorithm]

preview_player
Показать описание
Binary search is a searching algorithm in an array. The binary search time complexity is log n. It is more efficient than linear search for large arrays. Binary search works on sorted array.
Рекомендации по теме
Комментарии
Автор

The moment I heard Hello frands in the beginning, I thought he was gonna say Chai Peelo xD

kaushikbhat
Автор

Hi Vivek... my College Physics teacher, Prof Sahni, once said one should teach so that the dullest person can understand. If s/he does, then EVERYBODY will (meaning me) :). You've got that strategy! Keep it up. I now understand this log(n) thing. Most people just stated O log(n) and I had no idea how they arrived at that. I now get the binary idea... it's like when you are converting a base 10 number to binary -- 1, 2, 4, 8, 16, 32, 64, etc.

gloriaramlal
Автор

Straight!!! now I don't have any problem with my lecturer.. Thanks sir

simonblay
Автор

Beautifully explained, simple and straightforward. I loved how you illustrated the divide and conquer algorithm into a binary tree, I now have a better understanding of why O(log(n)). Greatly appreciated.

johns.williams
Автор

superb! I didn't found any other video for understand that theory part properly. Your one is only one video which was explain that clearly.
Thank you very much for your valuable service.

SHansi
Автор

We really appreciate your "hard work" sir. THANK you soo much for your valuable time. This was definitely the best explaination.

tamimabdullah
Автор

Thank you so much for explaining the problem step by step

PragneshLavantra
Автор

I liked the video even before it started. I wish I could subscribe twice and like your videos twice! Awesome content!!

axbax
Автор

your explanations are very clear and I understood very well sir .thank you very much.I am from Sri Lanka

hansikapiumali
Автор

Thank you sir... Your videos are easy to understand.. works very well in time of exams😅 thank you

tiyasachatterjee
Автор

Thanks for the video. Only thing I didn't understand why sorting time complexity is O(n log(n))=

VadixeM
Автор

'Big o notation' please make vedio on this topic sir g ❤love from pak 🇵🇰

tahirzubairofficial
Автор

Really all of your videos come with good explaination... Appreciate your efforts.... Are you a professor in college or a techie ?

satish
Автор

Could you explain step by step as to how you arrived at log (n) to the base 2 ?

c.danielpremkumar
Автор

Psodu code py b video bnae sir ap ke videos bht achii h or complexcity py b video bnaen

hassanshahabz
Автор

People from India explaining themes in english so good that i can really good follow. Thank you so much, you are my lifesave! I have an array with ~600.000 elements and i have to search like times, so i gonna try it out!


[Edit]
Wow ... it took 4 min instead more than 7 hour!

peinerkellerbier
Автор

Why no one explain, why do we write mid + 1 and mid - 1 as far as I can understand, it handles the corner index cases.

ChandanKr.
Автор

excellent explanation on this topic. Can you make an explanation for counting algorithm

annaramos
Автор

this is great! .. super explanation ..

sivasubrahmaniam
Автор

can u please make a video about Amortised Cost in Data Structures.

narasimharao