Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. ListNode * head = new ListNode(-1);
  2. push(head, 5);
  3. push(head, 20);
  4. push(head, 4);
  5. push(head, 3);
  6. push(head, 30);
  7. printf("%x", head);
  8. printList(head);
  9. printf("%x", head);
  10.  
  11. void printList(ListNode *head) {
  12. while (head != NULL) {
  13. printf("%d ", head->val);
  14. head = head->next;
  15. }
  16. printf("n");
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement