This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Implementation of Linked List and Insertion of Elements | |
#include<iostream> | |
#include<conio.h> | |
using namespace std; | |
struct Node{ | |
int data; // representation of list | |
Node* next; | |
}; | |
struct Node* head; | |
void insertAtHead(int x){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Implementation of Linked List and Insertion of Elements | |
#include<iostream> | |
#include<conio.h> | |
using namespace std; | |
struct Node{ | |
int data; // representation of list | |
Node* next; | |
}; | |
struct Node* head; | |
void insertAtHead(int x){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<conio.h> | |
#define size 10 | |
using namespace std; | |
class Stack{ | |
int a[size], top; | |
public: Stack(){ | |
top = -1; | |
} | |
void push(int x){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<conio.h> | |
using namespace std; | |
struct Node{ | |
int data; | |
Node *next; | |
}; | |
struct Node* head = NULL; // empty list creation | |
void push(int data){ | |
Node* temp = new Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<conio.h> | |
#define size 2 | |
using namespace std; | |
class Queue{ | |
int a[size],front,rear; | |
public: Queue(){ | |
front = rear = -1; | |
} | |
bool isEmpty(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<conio.h> | |
using namespace std; | |
struct Node{ | |
int data; | |
Node* next; | |
}; | |
Node* front = NULL; | |
Node* rear = NULL; | |
void display(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Implementation of Linked List and Insertion of Elements | |
#include<iostream> | |
using namespace std; | |
struct Node{ | |
int data; // representation of list | |
Node* next; | |
}; | |
struct Node* head; | |
void display(){ | |
Node* temp = head; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Implementation of Linked List and Insertion of Elements | |
#include<iostream> | |
using namespace std; | |
struct Node{ | |
int data; // representation of list | |
Node* next; | |
}; | |
struct Node* head; | |
void display(){ | |
Node* temp = head; |