FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaProb/selectionSorting.java at main · Warlord27/JavaProb · GitHub
Warlord27
/
JavaProb
Public
Notifications
You must be signed in to change notification settings
Fork
9
Star
13
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaProb
/
selectionSorting.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (20 loc) · 497 Bytes
Breadcrumbs
JavaProb
/
selectionSorting.java
Copy path
File metadata and controls
23 lines (20 loc) · 497 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public
class
selectionSorting
{
public
static
void
main
(
String
[]
args
) {
int
a
[]= {
5
,
66
,
789
,
112
,
7
,
63
,
16
,
36
,
11
,
22
,
33
},
r
,
c
,
temp
,
pos
;
for
(
r
=
0
;
r
<
a
.
length
-
1
;
r
++){
pos
=
r
;
for
(
c
=
r
+
1
;
c
<
a
.
length
;
c
++){
if
(
a
[
pos
]>
a
[
c
]){
pos
=
c
;
}
}
if
(
pos
!=
r
){
temp
=
a
[
pos
];
a
[
pos
]=
a
[
r
];
a
[
r
]=
temp
;
}
}
for
(
r
=
0
;
r
<
a
.
length
;
r
++)
System
.
out
.
println
(
a
[
r
]);
}
}
Back
|
FazBrowse Home
|
New Git URL