Skip to content

Commit c3ce77c

Browse files
committed
Selection sort README file and code comment updated and added in TOC
1 parent 325019e commit c3ce77c

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
- [Sorting](./Sorting/)
31-
- Selection Sort
31+
- [Selection Sort](./Sorting/Selection%20Sort)
3232
- [Bubble Sort](./Sorting/Bubble%20Sort)
3333
- [Insertion Sort](./Sorting/Insertion%20Sort)
3434
- Merge Sort

Sorting/Selection Sort/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ Selection sort algorithm starts by compairing first two elements of an array and
99

1010
If there are n elements to be sorted then, the process mentioned above should be repeated n-1 times to get required result.
1111

12-
#####A visualization on Selection Sort
12+
#### A visualization on Selection Sort
1313
![Selection sort demonstration](https://upload.wikimedia.org/wikipedia/commons/9/94/Selection-Sort-Animation.gif)
1414

1515
*Selection sort animation. Red is current min. Yellow is sorted list. Blue is current item.*
1616

17-
####Complexity Analysis
17+
#### Complexity Analysis
1818
- Worst Case - O(n<sup>2</sup>)
1919
- Average Case - O(n<sup>2</sup>)
2020
- Best Case - O(n<sup>2</sup>)
2121

2222
### More on this topic
23-
- https://en.wikipedia.org/wiki/Selection_sort
24-
- http://quiz.geeksforgeeks.org/selection-sort/
25-
- https://www.topcoder.com/community/data-science/data-science-tutorials/sorting/
23+
- [Selection Sort - WikiPedia](https://en.wikipedia.org/wiki/Selection_sort)
24+
- [Selection Sort - geeksforgeeks](http://quiz.geeksforgeeks.org/selection-sort/)

Sorting/Selection Sort/Selection.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
public class Selection
1+
/* Selection Sort implementation in Java */
2+
3+
public class Selection
24
{
35
//Following function will sort the array in Increasing (ascending) order
46
void sort(int arr[])

0 commit comments

Comments
 (0)