✔C++ Two Pointer || Easy to Understand || Time O(n) || Space O(1)
\nPlease Upvote if it helps...!\n\nclass Solution {\npublic:\n    ListNode* removeNthFromEnd(ListNode* head, int n) {\n        ListNode *slow = head;\n        L
![image](https://assets.leetcode.com/users/images/aa9908c4-58aa-4d16-a850-5885515a9064_1642417916.7980297.jpeg)\n**Please Upvote if it helps...!**\n```\nclass Solution {\npublic:\n    ListNode* removeNthFromEnd(ListNode* head, int n) {\n        ListNode *slow = head;\n        ListNode *fast = head;\n        int count = n;\n        while(count > 0)\n        {\n            fast = fast->next;\n            count--;\n        }      \n        if(fast == NULL)\n        {\n            return head->next; // edge case handled\n        }   \n        while(fast->next!=NULL)\n        {\n            slow=slow->next; \n            fast=fast->next;\n        }\n        slow->next = slow->next->next;\n        return head;\n    }\n};\n```
['Two Pointers', 'C']