diff --git a/Data Structures/Linked List Creation b/Data Structures/Linked List Creation new file mode 100644 index 0000000..4b0e775 --- /dev/null +++ b/Data Structures/Linked List Creation @@ -0,0 +1,33 @@ +#include +using namespace std; + +class Node +{ +public: + int data; + Node* next; +}; + +int main() +{ + Node* head = NULL; + Node* second = NULL; + Node* third = NULL; + + head = new Node(); + second = new Node(); + third = new Node(); + + head->data = 1; + head->next = second; + + second->data = 2; + + second->next = third; + + + third->data = 3; + third->next = NULL; + + return 0; +}