diff --git a/BubbleSort.java b/BubbleSort.java new file mode 100644 index 0000000..3dbe655 --- /dev/null +++ b/BubbleSort.java @@ -0,0 +1,18 @@ +package com.company; + +public class BubbleSort { + + public int[] sort(int[] arr){ + int temp; + for(int i=0; i arr[j]){ + temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + } + } + } + return arr; + } +}