Skip to content

Commit bc565f2

Browse files
add Real-World Example to Binary Search
1 parent 67d331a commit bc565f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Cheatsheet/BinarySearch/binary_search.md

+6
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,9 @@ where **`n`** is the number of elements in the search space.
9090
In each iteration, the algorithm **divides the search space in half**,
9191
until it is reduced to **a single value** (or no value if the target is not present).
9292
This **halving process** at every step is a characteristic of **logarithmic behavior**.
93+
94+
---
95+
96+
### Real-World Example
97+
98+
**Transaction search in financial systems:** In financial systems, a binary search can be used to quickly find a transaction or record by narrowing down the search range, as the data is typically stored in order. This makes it efficient to retrieve specific entries without searching through the entire database.

0 commit comments

Comments
 (0)