DS Lab
DS Lab
DS Lab
AALAB
LABREPORT
REPORTON
ON
• The circular linked list is a linked list where all nodes are connected to form a circle. In a circular linked list, the first node and the last
node are connected to each other which forms a circle. There is no NULL at the end.
ALGORITHM:
As it is the only node in the list, it will be the tail as well as head.
Keeping the above point in mind, we will make the NewNode point to the last(itself) NewNode – >
next = last.
By performing the above steps, the head and tail are being updated, as well as the NewNode is being
added to the empty list.
SOURCE CODE:
Enter 1 to Insert at Ending :-
OUTPUT: Enter 2 to Insert at Begining :-
Enter 3 to Insert at Position :-
Enter 4 to Delete at Ending :-
Enter 5 to Delete at Begining :-
Enter 6 to Delete at Position :-
Enter 7 to Display :-
Enter -1 to Exit :-
Enter your Choice :- 1
Enter the data:- 22
22 is Inserted at End