1. 첫 번째 코드 class Solution { public: ListNode* removeNthFromEnd(ListNode* head, int n) { int cnt = 1; ListNode* from = new ListNode(); from->next = head; ListNode remove = *head; while (remove.next) { remove = *remove.next; cnt++; } remove = *from; for (int i = 0; i next and n != cnt) tmp->next = tmp->next->next; else head = head->next; return head; } }; Colored by Color Scripter cs 2. 2. 완성한 코드 ..