单链表-创建、插入、删除、查找、反转等操作
//list.h
#include "singleList.h"int main(void){int array[] = {1,2,3,4,5,6,7,8,9,10};int len = sizeof(array)/sizeof(*array);int insertvalue = 100;Position p;pList head = creatList(array,len);printList(head);head = reversalList(head);printList(head);p = findNode(head,5);printf("the position value is : %d\n",p->value);//在元素为10前面插入100head = InsertList(head,10,insertvalue);printList(head);//在末节点后面插入10000head = lastInsertList(head,10000);printList(head);//删除10000的节点head = deleteNode(head,10000);printList(head);head = deleteNode(head,1);printList(head);head = deleteNode(head,5);printList(head);//释放链表head = freeList(head);printList(head);}