package hackerrank;

/**
 * https://www.hackerrank.com/challenges/find-the-median
 */
public class FindTheMedian {
    public static void main(String[] args) {

    }
}

@@ -14,16 +14,68 @@
 rrank;%0A%0A
+import java.util.Arrays;%0Aimport java.util.Scanner;%0A%0A
 /**%0A * h
@@ -169,48 +169,415 @@
    p
-ublic static void main(String%5B%5D args) %7B%0A
+rivate static int median(int%5B%5D array) %7B%0A        Arrays.sort(array);%0A        return array%5Barray.length / 2%5D;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Scanner in = new Scanner(System.in);%0A        int n = in.nextInt();%0A        int%5B%5D array = new int%5Bn%5D;%0A        for (int i = 0; i %3C array.length; i++) %7B%0A            array%5Bi%5D = in.nextInt();%0A        %7D%0A        System.out.println(median(array));
 %0A   

Solve Find the Median