MY VEDIOS Get link Facebook X Pinterest Email Other Apps - July 22, 2018 https://www.youtube.com/channel/UCmeHztKnb0iW0G9ao64-RaA?view_as=subscriber VEDIO 1 VEDIO 2 VEDIO 3 VEDIO 4 VEDIO 5 VEDIO 6 VEDIO 7 VEDIO 8 Get link Facebook X Pinterest Email Other Apps
Stack - November 13, 2019 Program #include<iostream> using namespace std; struct node { int data; node *next; }; class ListStack{ node *head; public: ListStack() { head=NULL; } void push(int info) { node *NewNode=new node; NewNode->data=info; NewNode->next=head; head=NewNode; } int pop() { if(IsEmpty()) { cout<<"Underflow occurs "; return NULL; } int info; node *cur=head; info=head->data; head=head->next; delete cur; return info; } int IsEmpty() { if(head==NULL) return 1; return 0; } }; int main() { ListStack s; s.push(20); cout<<s.pop(); cout<<s.pop(); } Read more
Operation on Single Linked List - November 09, 2019 Program /* * C++ Program to Implement Singly Linked List */ #include<iostream> #include<cstdio> #include<cstdlib> using namespace std; /* * Node Declaration */ struct node { int info; struct node *next; }*start; /* * Class Declaration */ class single_llist { public: node* create_node(int); void insert_begin(); void insert_pos(); void insert_last(); void delete_pos(); void sort(); void search(); void update(); void reverse(); void display(); single_llist() { start = NULL; ... Read more