@@ -0,0 +1,985 @@
+package leetcode;%0A%0A/**%0A * https://oj.leetcode.com/problems/remove-nth-node-from-end-of-list/%0A */%0Apublic class Problem19 %7B%0A    public static class ListNode %7B%0A        int val;%0A        ListNode next;%0A%0A        ListNode(int x) %7B%0A            val = x;%0A            next = null;%0A        %7D%0A    %7D%0A%0A    public ListNode removeNthFromEnd(ListNode head, int n) %7B%0A        if (n == 0) %7B%0A            return head;%0A        %7D%0A        ListNode tmp = head;%0A        boolean maxSize = false;%0A        for (int i = 0; i %3C= n; i++) %7B%0A            if (tmp == null) %7B%0A                maxSize = true;%0A                break;%0A            %7D%0A            tmp = tmp.next;%0A        %7D%0A        if (maxSize) %7B%0A            return head.next;%0A        %7D else %7B   %0A            ListNode toBeRemoved = head;%0A            for (ListNode node = tmp; node != null; node = node.next) %7B%0A                toBeRemoved = toBeRemoved.next;%0A            %7D%0A            toBeRemoved.next = toBeRemoved.next.next;%0A        %7D%0A        return head;%0A    %7D%0A%7D%0A

Solve problem 19