Sinlge Linked List
- insertion
- head insert
- tail insert
reverse
reverse first k elements of a list
https://www.geeksforgeeks.org/reverse-a-linked-lists
reverse first k elements of a list. (Insert in Head 头插法)
int ct = k;
while (ct-- > 0) {
ListNode *tmp = head->next;
head->next = cur;
cur = head;
head = tmp;
}