Implementing a circular linked list

In this recipe, we will learn how to implement a circular linked list. The difference between a linear linked list and a circular linked list is that where the last node of the linear linked list points at NULL, the pointer of the last node in a circular linked list points back to the first node, hence allowing the pointer to traverse in a backward direction too.