c++ program for Linked list as a class



Linked list as a class





OUTPUT:

1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice : 1

 Enter no of nodes : 4

 Next Data : 1

 Next Data : 2

 Next Data : 3

 Next Data : 4


1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice : 2

 Data stored in the linked list : 1 2 3 4

1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice : 3
Enter the location :5
Enter the data  :6


1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice : 2

 Data stored in the linked list : 1 2 3 4 6

1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice : 4
Enter the location :4


1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice :5
Length of the linked list = 4

1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice : 6
Enter element to be searched : 1

 Found at location : 1

1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice : 7
Reversed linked list :
 Data stored in the linked list : 6 3 2 1

1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice :8
 Creating first linked list ****

 Enter no of nodes : 3

 Next Data : 4

 Next Data : 56

 Next Data : 7

 Creating second linked list ****

 Enter no of nodes : 4

 Next Data : 5

 Next Data : 78

 Next Data : 2

 Next Data : 34

 Final Linked List *****

 Data stored in the linked list : 2 4 5 7 34 56 78

1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice :2
 Data stored in the linked list : 2 4 5 7 34 56 78

1)Create
2)Print
3)Insert
4)Delete
5)length
6)Search
7)Reverse
8)Merge two sorted linked list
9)Sort
10)Quit
Enter your Choice : 10