Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Selection Sort
class Rextester { public static void main(String args[]) { int A[] = {12,2,8,6,0,3,7,9,4,1,8,-4,-1,7,6,4,25,11,10,15,14,-9}; int indx; int minval; for(int i =0; i<A.length; i++){ indx = i; for(int j = i + 1; j<A.length; j++) { if(A[j] < A[i]) { indx = j; minval = A[indx]; A[indx] = A[i]; A[i] = minval; } } System.out.print(A[i] + ","); } } }
run
|
edit
|
history
|
help
0
JAVA # Dizi Ortalama
Remove unbalanced parentheses in a given expression
get top k frequent elements ( Priority Queue implementation ) Language: Editor: Layout:
Remove duplicates in string
S
Iterative Merge sort
Central Inteligence Agency
Hi
2 dimensional array (filled in by the user)
Duplicate in string