From b2b749f527a28c88400b39dfeb11eef52a3d2000 Mon Sep 17 00:00:00 2001 From: Calvin <31526471+Om-Pandey@users.noreply.github.com> Date: Tue, 2 Oct 2018 00:37:27 +0530 Subject: [PATCH] Delete insertionsort.java --- insertion_sort/java/insertionsort.java | 43 -------------------------- 1 file changed, 43 deletions(-) delete mode 100644 insertion_sort/java/insertionsort.java diff --git a/insertion_sort/java/insertionsort.java b/insertion_sort/java/insertionsort.java deleted file mode 100644 index 646dba35..00000000 --- a/insertion_sort/java/insertionsort.java +++ /dev/null @@ -1,43 +0,0 @@ -package java; -import java.util.*; -class InsertionSort -{ - /*Function to sort array using insertion sort*/ - public static void insertionsort(int arr[]) - { - int n = arr.length; - for (int i=1; i=0 && arr[j] > key) - { - arr[j+1] = arr[j]; - j = j-1; - } - arr[j+1] = key; - } - } - // Driver method - public static void main(String args[]) - { - Scanner sc = new Scanner(System.in); - System.out.println("Enter the number of values :"); - int var = sc.nextInt(); - System.out.println("Enter the values :"); - int arr[] = new int[var]; - for(int i =0 ; i < var ;i++) - arr[i] = sc.nextInt(); - InsertionSort ob = new InsertionSort(); - ob.insertionsort(arr); - sc.close(); - int n = arr.length; - for (int i=0; i