Searching-Stick is a small SFML-based C++ program that visually demonstrates two classic searching algorithms: Linear Search and Binary Search. The array elements are represented as vertical "sticks", making it easier to understand how each algorithm operates step-by-step.
- C++
- SFML (Simple and Fast Multimedia Library)
- Linear Search โ Scans each stick from left to right until the target is found.
- Binary Search โ Efficiently searches a sorted array by repeatedly dividing the search range in half.
- The sticks are stored in a dynamic array
- Each Stick is a custom struct that contains properties such as height and color, used for visualization.
- Real-time visual feedback for search operations
- Highlights each step during the search
- Educational tool for beginners to understand search algorithms visually
- SFML installed on your system
-
Clone the repository:
git clone https://github.com/Chintan-Patel-Games/Searching-Stick.git
-
Run the executable
- Linear Search
- Binary Searh