Binary Search Real life

Опубликовано: 17 Октябрь 2024
на канале: Computer Science Tutorials
15,167
186

This video shows how binary search would be in real life.
Binary search is used to find an element in a list of sorted items.
It finds the element in the middle of the list, if that element is greater than what we are looking for, it will find the mid point on the left half of the list and check again from that point. If the element is less than what we are looking for, it will find the mid point on the right half of the list and then check again from that point. It keeps doing this until there are no more elements in the list or one of the elements is equal to what we are looking for.
Thanks for watching.