From 441726a30d9e0da30002776e452b02fa70c76108 Mon Sep 17 00:00:00 2001 From: Satyakrishna Jasti Date: Fri, 18 Oct 2019 08:15:08 +0530 Subject: [PATCH 1/2] Update Bubble.java --- Sorting/Bubble.java | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/Sorting/Bubble.java b/Sorting/Bubble.java index d22fea6..8fabf86 100644 --- a/Sorting/Bubble.java +++ b/Sorting/Bubble.java @@ -1,9 +1,26 @@ +// Github: github.com/RodneyShag + +import java.util.Scanner; + public class Bubble { + public static void main(String[] args) { + /* Read input */ -public static void main(String[] args) { - - - int a[]= {9,8,7,6,5,4,3,2,1}; + Scanner sc=new Scanner(System.in); + System.out.print("Enter Number of Elements: "); + int n=sc.nextInt(); + int a[]=new int[n]; + for(int i=0;i Date: Fri, 18 Oct 2019 08:15:29 +0530 Subject: [PATCH 2/2] Update Bubble.java --- Sorting/Bubble.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sorting/Bubble.java b/Sorting/Bubble.java index 8fabf86..4ef4720 100644 --- a/Sorting/Bubble.java +++ b/Sorting/Bubble.java @@ -1,10 +1,10 @@ -// Github: github.com/RodneyShag + import java.util.Scanner; public class Bubble { public static void main(String[] args) { - /* Read input */ + Scanner sc=new Scanner(System.in); System.out.print("Enter Number of Elements: ");