C++ || Easy  explanation | | simple ||
/ question me dia apko ek linked list di h or bola h Nth node from the end delete krdo  mtlb agar linked list h \nL1 = [1,2,3,4,5] or N=2 to last 2nd node delet
/* question me dia apko ek linked list di h or bola h Nth node from the end delete krdo  mtlb agar linked list h \nL1 = [1,2,3,4,5] or N=2 to last 2nd node delete krdo to vo konsi hogi vo hogi vo node jiska data h 4 to hme 4 ko delete krna h iske lia hmne kya kia hmne ek fast pointer lia jo head pe khada h ek slow ha vo bhi head pe h to phle fast ko jb tk chala lo jb tk fast \'n\' nhi ho jata fir hmne kya kia ek slow pointer lia usko chlao fast ke sath jb tk fast null nhi ho jata (slow bhi ek step , fast bhi ek step) jse hi fast null ho jae to appka slow us position pe ho jisko delete krna h to abb kya kro slow ke next ko krdo slow ke next ka next */\n\n\n\n\nclass Solution {\n\npublic:\n\n    ListNode* removeNthFromEnd(ListNode* head, int n) {\n\t\n        ListNode* fast = head;\n\t\t\n        if(head == NULL)\n\t\t\n            return NULL;\n\t\t\t\n        ListNode* slow = head;\n        \n        int count = 1;\n        while(n--){\n            cout<<fast->val<<" ";\n           fast = fast->next;\n        }\n        if(fast== NULL)\n            return slow->next;\n            \n        while(fast->next != NULL){\n            slow = slow->next;\n            fast = fast->next;\n        }\n          slow->next = slow->next->next;\n          return head;\n       }\n  \n};
['Linked List', 'Two Pointers', 'C']