@@ -0,0 +1,1442 @@
+/**%0A * Created by aubdira on 10/30/17.%0A * BogoSort is an ineffective sorting algorithm. The algorithm%0A * generates permutations of its input until it finds one that is sorted.%0A */%0Apublic class BogoSort %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        //Enter array to be sorted here%0A        int%5B%5D arr = %7B12, 43, 5, -5, 0, 13%7D;%0A%0A        BogoSort now = new BogoSort();%0A        System.out.print(%22Unsorted: %22);%0A        now.printArray(arr);%0A%0A        now.bogo(arr);%0A%0A        System.out.print(%22Sorted: %22);%0A        now.printArray(arr);%0A    %7D%0A%0A    private void bogo(int%5B%5D arr) %7B%0A        while (!isSorted(arr)) %7B%0A            shuffle(arr);%0A        %7D%0A    %7D%0A%0A    /**%0A     * Use  Fisher-Yates shuffle algorithm to shuffle the array%0A     *%0A     * @param arr input array%0A     */%0A    private void shuffle(int%5B%5D arr) %7B%0A        int i = arr.length - 1;%0A        while (i %3E 0) %7B%0A            swap(arr, i--, (int) (Math.random() * i));%0A        %7D%0A    %7D%0A%0A    private void swap(int%5B%5D arr, int i, int j) %7B%0A        int temp = arr%5Bi%5D;%0A        arr%5Bi%5D = arr%5Bj%5D;%0A        arr%5Bj%5D = temp;%0A    %7D%0A%0A    private boolean isSorted(int%5B%5D arr) %7B%0A        for (int i = 1; i %3C arr.length; i++) %7B%0A            if (arr%5Bi%5D %3C arr%5Bi - 1%5D) %7B%0A                return false;%0A            %7D%0A        %7D%0A        return true;%0A    %7D%0A%0A    private void printArray(int%5B%5D arr) %7B%0A        for (int anArr : arr) %7B%0A            System.out.print(anArr + %22 %22);%0A        %7D%0A        System.out.println();%0A    %7D%0A%7D%0A%0A

Add BojoSort.java