Jaconir

Searching Algorithms

Master the fundamental algorithms for finding data, from the efficient Binary Search to graph traversals like BFS and DFS.

Finding Needles in Haystacks

Searching is one of the most common tasks in programming. Imagine looking for a contact in your phone or a file on your computer. Behind the scenes, a searching algorithm is at work. A simple approach is **Linear Search** (checking every single item), but that's slow for big lists. We'll explore smarter, faster ways.

Binary Search Visualizer
Binary Search is a super-fast way to find an item in a **sorted** list. Imagine finding a word in a dictionary: you open to the middle, see if your word is before or after, and then you only have to search one half. Binary Search does the same thing, cutting the search area in half with every step.
2
5
8
12
16
23
38
56
72
91
Enter a target value and click "Start Search".
Graph Traversal (BFS vs. DFS)
Compare how Breadth-First Search (**BFS**) explores neighbors level-by-level (like ripples in a pond), while Depth-First Search (**DFS**) goes as deep as it can down one path before backtracking.
ABCDEFGH
Select an algorithm and click "Start".
[]
[]
Interview Problems
Learn how to apply searching concepts to solve common interview questions.
1357
10111620
23303460
Start. Treat the 2D matrix as a flat, sorted array of size 12. Left=0, Right=11.
Coding Challenge
You are given an integer array `nums` sorted in ascending order (with distinct values), which is possibly rotated at an unknown pivot. Given a `target` value, return the index of the target if it is in `nums`, or -1 if it is not.
Quick Quiz: Test Your Knowledge

Which data structure is used to implement Breadth-First Search (BFS)?

Binary search can only be performed on which type of data structure?

Which graph traversal algorithm is more suitable for finding the shortest path between two nodes in an unweighted graph?

Go Deeper with "Grokking Algorithms"

"Grokking Algorithms" provides incredibly clear, illustrated explanations of Binary Search and graph algorithms that are perfect for visual learners.

J
Dafin Edison J
Creator & Developer of Jaconir

I build things for the web. From immersive games to practical tools, my goal is to create products that people love to use and to share the knowledge I've gained along the way.