Binary search algorithm is a special way to search for something on a computer.

Imagine you have a big stack of paper and you are looking for your favorite book. To find it, you can look through each page until you find it. This is called "linear search" because you are looking through the pages one after another in a linear line.

With a binary search, it's like you have the same big stack of paper but instead of looking through each page one at a time, you split the stack in half. Then you look at the page in the middle. If the page you are looking for is not in the middle, you know it must be in either the top half or the bottom half. So you split the top or bottom half again and look at the page in the center. You keep doing this until you find the page you are looking for. This is faster than looking at each page one at a time.

Imagine you have a big stack of paper and you are looking for your favorite book. To find it, you can look through each page until you find it. This is called "linear search" because you are looking through the pages one after another in a linear line.

With a binary search, it's like you have the same big stack of paper but instead of looking through each page one at a time, you split the stack in half. Then you look at the page in the middle. If the page you are looking for is not in the middle, you know it must be in either the top half or the bottom half. So you split the top or bottom half again and look at the page in the center. You keep doing this until you find the page you are looking for. This is faster than looking at each page one at a time.