From d330c39a23caca6abe096df564dda8d1e51ffbdb Mon Sep 17 00:00:00 2001 From: Jai Gora Date: Fri, 1 Oct 2021 13:42:10 +0530 Subject: [PATCH] BubbleSortAlgo.java --- BubbleSortAlgo.java | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 BubbleSortAlgo.java diff --git a/BubbleSortAlgo.java b/BubbleSortAlgo.java new file mode 100644 index 0000000..02640bb --- /dev/null +++ b/BubbleSortAlgo.java @@ -0,0 +1,31 @@ +package sorting_algo; + +import java.util.Scanner; + +public class BubbleSortAlgo { + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + int n = sc.nextInt(); + int a[] = new int[n]; + + for(int i=0; i