sorting java
public class SortingData { public static void main(String[] args) { int[] arr = { 13, 7, 6, 45, 21, 9, 101, 102 }; Arrays.sort(arr);//sort() function System.out.printf("Modified arr[] : %s", Arrays.toString(arr)); } }
sorting java
public class SortingData { public static void main(String[] args) { int[] arr = { 13, 7, 6, 45, 21, 9, 101, 102 }; Arrays.sort(arr);//sort() function System.out.printf("Modified arr[] : %s", Arrays.toString(arr)); } }
sort algorithms java
for (int i = 0; i < arr.length; i++) { for (int j = 0; j < arr.length-1-i; j++) { if(arr[j]>arr[j+1]) { int temp=arr[j]; arr[j]=arr[j+1]; arr[j+1]=temp; } } System.out.print("Iteration "+(i+1)+": "); printArray(arr); } return arr; // BUBBLE SORT
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us