Create a circular linked list of size N .
head = Node ( 1 ) NEW_LINE prev = head NEW_LINE for i in range ( 2 , n + 1 ) : NEW_LINE INDENT prev . next = Node ( i ) NEW_LINE prev = prev . next NEW_LINE DEDENT