Skip to content

Commit 09574cb

Browse files
committed
Enhance algorithms explanation
- Added a recurrence relation to provide deeper insight into the time complexity analysis. - Addressed minor alignment issues for improved readability. Files/Paths Affected: - en/Sorting Algorithms/Merge Sort.md
1 parent 03e42f6 commit 09574cb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

en/Sorting Algorithms/Merge Sort.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,19 @@ Average - O(n log n)
1818
Worst case - O(n log n)
1919
```
2020

21+
The time complexity can be obtained by solving the below recurrance relation
22+
\begin{equation*}
23+
\begin{aligned}
24+
T(n) = 2T\left(\frac{n}{2}\right) + An
25+
\end{aligned}
26+
\end{equation*}
27+
28+
2129
#### Space Complexity
2230

23-
`O(n)`
31+
```
32+
O(n)
33+
```
2434

2535
#### Example 1
2636

0 commit comments

Comments
 (0)