typedef struct Node
{
int data;
struct Node *next;
}Node;
typedef struct Queue
{
Node *head, *tail;
}Queue;
void Initi(Queue &Q)
{
Q.head = (Node *)malloc(sizeof(Node));
Q.tail = Q.head;
Q.head->Next = NULL;
}
void EnQueue(Queue &Q, int d)
{
Node *node = (Node *)malloc(sizeof(Node));
node->data = d;
node->Next = NULL;
Q.rear->Next = node;
Q.rear = node;
}
bool IsEmpty(Queue Q)
{
Node *node = Q->head->Next;
if(node == NULL
return true;
return false;
}