Skip to content

Commit 56d0aa5

Browse files
committed
Added Complexity to Insertion Sort README.md
1 parent 5f52182 commit 56d0aa5

File tree

1 file changed

+7
-0
lines changed
  • src/algorithms/sorting/insertion-sort

1 file changed

+7
-0
lines changed

src/algorithms/sorting/insertion-sort/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ sort.
1010

1111
![Algorithm Visualization](https://upload.wikimedia.org/wikipedia/commons/0/0f/Insertion-sort-example-300px.gif)
1212

13+
## Complexity
14+
15+
###### time: worst _O_(_n_<sup>2</sup>), best _O_(_n_), average _O_(_n_<sup>2</sup>)
16+
17+
###### space: worst _O_(1) auxiliary
18+
19+
1320
## References
1421

1522
[Wikipedia](https://en.wikipedia.org/wiki/Insertion_sort)

0 commit comments

Comments
 (0)