Java solution for beginners || LinkedList || easy-to-understand
Please UPVOTE if you like my solution!\n\n\nclass Solution {\n    public ListNode removeNthFromEnd(ListNode head, int n) {\n        int count = 1;\n        List
Please **UPVOTE** if you like my solution!\n\n```\nclass Solution {\n    public ListNode removeNthFromEnd(ListNode head, int n) {\n        int count = 1;\n        ListNode c = head;\n        while(c.next!=null){\n            count++;\n            c=c.next;\n        }\n        \n        if(n == count){\n            head = head.next;\n            return head;\n        }\n        \n        ListNode ln = head;\n        int i= 0;\n        while(++i<count-n){\n            ln = ln.next;  \n        }\n        ln.next = ln.next.next;\n        \n        return head;\n    }\n}\n```
['Linked List', 'Java']