
// Danh sach lien ket don vong.
#include<iostream>
using namespace std;
int n;
struct Node{
int data;
Node *next;// chua dia chi node ke tiep ma no tro toi
};
struct List{
Node *head;
Node *tail;
};
void Init(List &l){ // k tao List rong
l.head = l.tail = NULL;
}
Node *creatNode(int x ){ //tao thong tin cho node
Node *p = new Node;
if(p == NULL) exit(1);
p->next = NULL;
p->data = x;
return p;
}
bool isEmpty(List...