[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/AllAlgorithms/java/master/sorting/SelectionSort.java [Back]  [Original]

package demos;

import java.util.Scanner;

public class SelectionSort {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);//user input using scanner
		System.out.println("Enter the size of the array");//taking size of the array from user
		int size=sc.nextInt();
		
		int array[]=new int[size];//declaring array of n elements to be sorted
		System.out.println("Enter"+ size + "elements to sort");
		for(int i=0;i

Web Proxy Viewer  |  New URL  |  Original Page