circular linked list algorithm in data structure