package hackerrank;

import java.util.Scanner;

/**
 * https://www.hackerrank.com/challenges/almost-sorted
 */
public class AlmostSorted {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // TODO
    }
}

@@ -132,16 +132,91 @@
 orted %7B%0A
+    private static void almostSorted(int%5B%5D array) %7B%0A        // TODO%0A    %7D%0A%0A
     publ
@@ -301,28 +301,105 @@
 n);%0A        
-// TODO
+int n = in.nextInt();%0A        int%5B%5D array = new int%5Bn%5D;%0A        almostSorted(array);
 %0A    %7D%0A%7D%0A

Update Almost Sorted