typedef struct Node {
int data;
struct Node * next;
} NODE;
void linklist_create_with_taiI_insert(int* data,unsigned short n)
{
NODE* pHead = (Node*)malloc(sizeof(Node));
NODE* pCurr = NULL;
NODE* pTail = pHead;
for(int i = 0; i < n; ++i) {
pCurr = (NODE*)malloc(sizeof(NODE));
pCurr -> data = data[i];
pTail -> next = pCurr;
pTail = pCurr;
}
pTail -> next = NULL;
printf("尾插法:\n");
for(int j = 0; j < n; ++j) {
printf("%d\t", pHead -> next -> data);
pHead = pHead -> next;
}
}