Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

enqueue function with linked list implementation in c++

void Display() {
   temp = front;
   if ((front == NULL) && (rear == NULL)) {
      cout<<"Queue is empty"<<endl;
      return;
   }
   cout<<"Queue elements are: ";
   while (temp != NULL) {
      cout<<temp->data<<" ";
      temp = temp->next;
   }
   cout<<endl;
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #enqueue #function #linked #list #implementation
ADD COMMENT
Topic
Name
6+3 =