class SelectionInTwoSortedArray {

    public static int getKthElementInTwoArray(int[] A, int[] B, int k) {// K is start from 1
        if (k <= 0 || k > A.length + B.length) {
            throw new IllegalArgumentException("invalid k " + k);
        }
        //TODO: ADD YOUR CODE HERE
        return -1;
    }

}