public static <T> Object[] removeAt0(List<T> list, int k) {
        List<T> input = new ArrayList<>(list);
        T kth = input.remove(k);
        return new Object[]{input, kth};
    }
(*) Remove the K'th element from a list
java8/src/main/java/com/shekhargulati/ninetynine_problems/_01_lists/P20.java