[C++] solution with complexity analysis || two methods || two pointers
T = O(m) where m is number of iterations\n### S = O(1) no extra space used\n\n  // approach using single pass using fast and slow pointer\n\n\tListNode* fast = 
### T = O(m) where m is number of iterations\n### S = O(1) no extra space used\n```\n  // approach using single pass using fast and slow pointer\n\n\tListNode* fast = head;\n\tListNode* slow = head;\n\n\tfor(int i = 0; i < n; i++) {\n\t\tfast= fast->next;\n\t}\n\n\tif (fast == nullptr) return head->next;\n\n\twhile(fast->next) {\n\t\tslow = slow->next;\n\t\tfast = fast->next;\n\t}\n\n\tslow->next = slow->next->next;\n\treturn head;\n```\n\n```\n// approach using double pass\nListNode* temp = head;\nint l = 0;\nwhile(temp) {\n   temp = temp->next;\n   l++;\n}\n\n// corner case\nif(l == n) {\n\treturn head->next;\n}\nListNode* p = head;\nint j = 0;\nfor(int i = 0; i < l-n-1; i++) {\n\tp = p->next;\n\tj++;\n}\n\ncout << j;\nListNode* del = p->next;\np->next = del->next;\ndelete del;\nreturn head;\n```\n
['Two Pointers', 'C', 'C++']