Skip to content

Commit af13bf0

Browse files
authored
Update selectionSort readme to meet PR requirements
1 parent e7b191a commit af13bf0

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

sortingAlgo/selectionSort/selectionSort.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,20 @@ selection sort(array)
1111
```
1212

1313
# Time Complexities:
14-
- Worst Case: O(n<sup>2</sup>)
14+
- Worst Case/Average: O(n<sup>2</sup>)
1515
- Best Case: O(n)
16+
Selection sort is inefficient on large lists.
17+
18+
# Space Complexity:
19+
- O(1)
20+
Selection sort has a space complexity of O(1), making it efficient when memory is lacking.
21+
22+
# Instructions for running Code:
23+
- cpp
24+
```
25+
g++ selectionSort.cc
26+
./a.out
27+
```
28+
- python
29+
```
30+
python3 selectionSort.py

0 commit comments

Comments
 (0)