Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0baef42

Browse filesBrowse files
committed
Add selection sort code
1 parent 6f9b7d2 commit 0baef42
Copy full SHA for 0baef42

1 file changed

+1-1Lines changed: 1 addition & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/test/java/sort/SelectionSort.java‎

Copy file name to clipboardExpand all lines: src/test/java/sort/SelectionSort.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public int[] solution(int[] arr) {
3535

3636
for (int i = 0; i < result.length - 1; i++) {
3737
maxPos = i;
38-
for (int k = i + 1g; k < result.length; k++) {
38+
for (int k = i + 1; k < result.length; k++) {
3939
if (result[maxPos] > result[k]) {
4040
maxPos = k;
4141
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.