Created
October 10, 2019 03:51
-
-
Save easleyschool/8b330292e6c08e3b98e308ed6cc6813e to your computer and use it in GitHub Desktop.
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
/* | |
Data structure below represents a simple Linked List | |
*/ | |
class LinkedList | |
{ | |
private: | |
/* define the list it self */ | |
node *head; | |
public: | |
//function to add Node at front | |
int addAtFront(node *n); | |
//function to check whether Linked list is empty | |
int isEmpty(); | |
//function to add Node at the End of list | |
int addAtEnd(node *n); | |
//function to search a value | |
node* search(int k); | |
//function to delete any Node | |
node* deleteNode(int x); | |
/* | |
Initialization (default construction) | |
*/ | |
LinkedList() | |
{ | |
head = NULL; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment