Skip to content

Commit fce5d5e

Browse files
committed
Update README to include table of contents
1 parent 9120191 commit fce5d5e

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
1-
# Linear Search
1+
# Table of Contents
2+
3+
1. [Linear Search](#linear-search)
4+
2. [Jump Search](#jump-search)
5+
3. [Binary Search](#binary-search)
6+
7+
# Searching Slgorithms
8+
9+
## Linear Search
210

311
Linear search is a searching algorithm that sequentially checks each element in a list until the desired element is found or the sequence ends.
412

5-
## Time Complexity
13+
### Time Complexity
614

715
- **Best Case:** **O(1)** (Element found at the beginning)
816
- **Worst Case:** **O(n)** (Element at the end or not present)
917

10-
# Jump Search
18+
## Jump Search
1119

1220
Jump Search is a searching searching algorithm that works on **sorted** arrays. It reduces the number of comparisons by jumping ahead in fixed steps instead of checking elements one by one.
1321

14-
## Time Complexity
22+
### Time Complexity
1523

1624
- **Best Case:** O(1) (First element is the target)
1725
- **Worst Case:** O(sqrt{n})
1826

19-
# Binary Search
27+
## Binary Search
2028

2129
Binary search is a searching algorithm that find the desiired element in a **sorted** sequence by repeatedly dividing the search interval in half until the target is found or the interval is empty.
2230

23-
## Time Complexity
31+
### Time Complexity
2432

2533
- **Best Case:** **O(1)** (Element is in the middle)
2634
- **Worst Case:** **O(log n)** (Element at the end or not present)

0 commit comments

Comments
 (0)