Searching Algorithms
Visualize how different searching algorithms find elements step by step
Linear Search
Scan through each element one by one until the target is found
Time Complexity: O(n)
Binary Search
Repeatedly divide a sorted array into halves, narrowing search range
Time Complexity: O(log n)
Jump Search
Search by jumping ahead fixed steps, then linear search in block
Time Complexity: O(√n)
Interpolation Search
Improved binary search for uniformly distributed sorted arrays
Time Complexity: O(log log n)
Exponential Search
Find range by exponential jumps, then binary search within range
Time Complexity: O(log n)
Ternary Search
Divide sorted array into three parts, search in relevant segment
Time Complexity: O(log₃ n)
Fibonacci Search
Uses Fibonacci numbers to divide array, similar to binary search
Time Complexity: O(log n)
Hash Table Search
Direct access using hash function for key-value lookups
Time Complexity: O(1) avg
Linked List Search
Linear search through nodes rather than array indices
Time Complexity: O(n)
Binary Search Tree
Traverse down tree based on value comparisons
Time Complexity: O(log n) avg
Graph Search (BFS/DFS)
Breadth-First and Depth-First Search in graph structures
Time Complexity: O(V + E)