Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ListNode * head = new ListNode(-1);
- push(head, 5);
- push(head, 20);
- push(head, 4);
- push(head, 3);
- push(head, 30);
- printf("%x", head);
- printList(head);
- printf("%x", head);
- void printList(ListNode *head) {
- while (head != NULL) {
- printf("%d ", head->val);
- head = head->next;
- }
- printf("n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement