C++ || del. n-th node from the end.
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:O(n).\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1) .\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * Definition for singly-linked list.\n * struct ListNode {\n *     int val;\n *     ListNode *next;\n *     ListNode() : val(0), next(nullptr) {}\n *     ListNode(int x) : val(x), next(nullptr) {}\n *     ListNode(int x, ListNode *next) : val(x), next(next) {}\n * };\n */\nclass Solution {\npublic:\n    ListNode* removeNthFromEnd(ListNode* head, int n) {\n        ListNode* temp=new ListNode();\n        temp->next=head;\n\n        ListNode* fast=temp;\n        ListNode* slow=temp;\n\n        for(int i=1;i<=n;i++){\n             fast=fast->next;\n        }\n\n        while(fast->next!=NULL){\n            fast=fast->next;\n            slow=slow->next;\n        }\n\n        ListNode* gaya=slow->next;\n        slow->next=slow->next->next;\n        delete(gaya);\n        \n        return temp->next;\n    }\n};\nif it helps plzz don\'t Forget to upvote it :)\n```
['Linked List', 'C++']