File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 28
28
29
29
30
30
- [ Sorting] ( ./Sorting/ )
31
- - Selection Sort
31
+ - [ Selection Sort] ( ./Sorting/Selection%20Sort )
32
32
- [ Bubble Sort] ( ./Sorting/Bubble%20Sort )
33
33
- [ Insertion Sort] ( ./Sorting/Insertion%20Sort )
34
34
- Merge Sort
Original file line number Diff line number Diff line change @@ -9,17 +9,16 @@ Selection sort algorithm starts by compairing first two elements of an array and
9
9
10
10
If there are n elements to be sorted then, the process mentioned above should be repeated n-1 times to get required result.
11
11
12
- ##### A visualization on Selection Sort
12
+ #### A visualization on Selection Sort
13
13
![ Selection sort demonstration] ( https://upload.wikimedia.org/wikipedia/commons/9/94/Selection-Sort-Animation.gif )
14
14
15
15
* Selection sort animation. Red is current min. Yellow is sorted list. Blue is current item.*
16
16
17
- ####Complexity Analysis
17
+ #### Complexity Analysis
18
18
- Worst Case - O(n<sup >2</sup >)
19
19
- Average Case - O(n<sup >2</sup >)
20
20
- Best Case - O(n<sup >2</sup >)
21
21
22
22
### 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/ )
Original file line number Diff line number Diff line change 1
- public class Selection
1
+ /* Selection Sort implementation in Java */
2
+
3
+ public class Selection
2
4
{
3
5
//Following function will sort the array in Increasing (ascending) order
4
6
void sort (int arr [])
You can’t perform that action at this time.
0 commit comments