Circular Linked List Implementation

https://online.codingblocks.com/app/player/75258/content/151698/5992/lecture
In this video, the final output is 50->40->30->20->
But in the main function, we have inserted 10 as well. So the output should have been 50->40->30->20->10->
What is the solution to that? Why aren’t we getting 10 in the output?
How to solve this problem?

Hey that’s because of print function
After termination of while loop we also have to print data of current node
because loop will terminate when curr->next=head
Now suppose if only one node is there then loop will not print anything
So thats why after termination of loop we have to print the data of our current node.