单链表的建立(有头结点和无头结点)

一、有头结点的单链表的建立 #include <iostream> using namespace std; struct ListNode{ int val; ListNode *next; }; //有头结点的单链表的建立 int CreateListNode(ListNode *head) { if(head == NULL) return 1
相关文章
相关标签/搜索