import java.util.Scanner; public class sorting { public static void main(String[] args) { Scanner sc = new Scanner(System.in); boolean sorted = true; System.out.println("Enter the size of array: "); int n=sc.nextInt(); int a[]=new int[n]; System.out.println("Enter the elements of array : "); for (int i=0;i