Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Bubble Sort
class Rextester { public static void main(String args[]) { int max; int A[]={100,8,6,4,2,7,1,0,3,10,9}; for(int i =0;i<A.length-1; i++) { for(int j=0; j<A.length-1; j++) { if(A[j]>A[j+1]) { max = A[j]; A[j] = A[j+ 1]; A[j +1] = max; } } } for(int q = 0; q<A.length; q++){ System.out.print(A[q] + ","); } } }
run
|
edit
|
history
|
help
0
1.6
Rextester.java
LeetCode 121 - Best time to buy and sell stock - O(n) solution
Rakibul Haque
DecoratedFrame.java
H
hellojava.java
Satish Shankar Nikam
sq-buzz
mostrar pam