# Binary Search

## Find First and Last Position of Element in Sorted Array | LeetCode 34 | Python | Solution

Click here to see the problem details on LeetCode. Problem Overview We will be given an integer array (sorted in no-decreasing order) and an integer. We have to find the position of the given integer from the Array. But there is a trick. That is, we have to find the first and last position of […]

## Binary Search | Algorithm

Binary Search is one of the most popular searching algorithms. We use this to search specific elements on a sorted list. It doesn’t matter it’s ascending or descending. A binary search is not applicable on an unsorted list. It’s a fast and widely used algorithm. In real life, you might already use this algorithm without

## 700. Search in a Binary Search Tree | LeetCode | Python | Solution

Click here to see the problem in LeetCode. Read the description carefully. This one is a pretty easy problem for you if you know how to search on Binary Search Tree (BST). First, we will be given a Binary Search Tree and a value for search. We have to search for the given value in

## 35. Search Insert Position | LeetCode | Python | Solution

This one is a binary search-related problem. Click here to see the problem in LeetCode. We will be given a sorted array in ascending order. And a target value. So, what do we have to do? We will have to return the index of the target value. If the target value is not in the

## 704. Binary Search | LeetCode | Python | Solution

Read the problem description first. To see the problem, click here. There is nothing to explain. It’s nothing but a binary search implementation. If you know how to implement Binary Search, then you already know the solution. Since you are in Leetcode, I believe you know this searching algorithm. If you don’t know binary search,