@anonymous/

RadiantFinancialAstronomy

Java

No description

fork
loading
Files
  • Main.java
  • QuickSort.java

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.2466216060256914","path":"Main.java","file":{"path":"Main.java","content":{"asEncoding":{"base64":"Y2xhc3MgTWFpbiAKeyAgCiAgICAvKiBBIHV0aWxpdHkgZnVuY3Rpb24gdG8gcHJpbnQgYXJyYXkgb2Ygc2l6ZSBuICovCiAgICBzdGF0aWMgdm9pZCBwcmludEFycmF5KGludCBhcnJbXSkgCiAgICB7IAogICAgICAgIGludCBuID0gYXJyLmxlbmd0aDsgCiAgICAgICAgZm9yIChpbnQgaT0wOyBpPG47ICsraSkgCiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnQoYXJyW2ldKyIgIik7IAogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigpOyAKICAgIH0gCgogICAgLy8gRHJpdmVyIHByb2dyYW0gCiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmcgYXJnc1tdKSAKICAgIHsgCiAgICAgICAgaW50IGFycltdID0gezgsIDEsIDksIDMsIDUsIDcsIDZ9OyAKICAgICAgICBpbnQgbiA9IGFyci5sZW5ndGg7IAoKICAgICAgICBRdWlja1NvcnQgb2IgPSBuZXcgUXVpY2tTb3J0KCk7IAogICAgICAgIG9iLnNvcnQoYXJyLCAwLCBuLTEpOyAKCiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJzb3J0ZWQgYXJyYXkiKTsgCiAgICAgICAgcHJpbnRBcnJheShhcnIpOyAKICAgIH0gCn0="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class Main 
{  
    /* A utility function to print array of size n */
    static void printArray(int arr[]) 
    { 
        int n = arr.length; 
        for (int i=0; i<n; ++i) 
            System.out.print(arr[i]+" "); 
        System.out.println(); 
    } 

    // Driver program 
    public static void main(String args[]) 
    { 
        int arr[] = {8, 1, 9, 3, 5, 7, 6}; 
        int n = arr.length; 

        QuickSort ob = new QuickSort(); 
        ob.sort(arr, 0, n-1); 

        System.out.println("sorted array"); 
        printArray(arr); 
    } 
}