Binary Search
Last updated
What is Binary Search?
Binary search is a search algorithm that finds the position of a target value within a sorted array. Binary search compares the target value to the middle element of the array. If they are not equal, the half in which the target cannot lie is eliminated and the search continues on the remaining half, again taking the middle element to compare to the target value, and repeating this until the target value is found. If the search ends with the remaining half being empty, the target is not in the array.
Free resources to learn Binary Search
More in stage 5: Endianess
- Endianess
- Big Endian
- Little Endian
- Breadth First Search
- Tail Recursion
- Bubble Sort
- Pre-Order Traversal
- Depth First Search
- Non-Tail Recursion
- Selection Sort
- In-Order Traversal
- Bellman Ford's Algorithm
- Insertion Sort
- Post Order Traversal
- Dijkstra's Algorithm
- Breadth First Search
- Heap Sort
- A* Algorithm
- Depth First Search
- Quick Sort
- Linear Search
- Merge Sort
- Dijkstra's Algorithm
- Finding Hamiltonian Paths
- MFU Cache
- Huffman Coding
- Solving N Queen Problem
- LRU Cache
- Kruskal's Algorithm
- Maze Solving Problem
- LFU Cache
- Ford-Fulkerson Algorithm
- The Knight's Tour Problem
- Prim's Algorithm
- Rabin-Karp Algorithm
- Search Pattern in Text
- Suffix Arrays
Binary Search: common questions
Can I learn Binary Search in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Binary Search in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Binary Search tutorial for beginners?
It is lesson 59 of 188 in the free Computer Science roadmap, in stage 5, Endianess. If you are new to Computer Science, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.