pseudo code for counting circular list

actually i haven’t yet figured out how it is in real code.

cirlist_node_count (circular_list  a)
    node*  tmp = pint->next;
    pint->next = NULL;
    list& pont = tmp;/* inheritance */
    int count = get_linked_list_count(pont);
    get_tail_ref(pont)->next = tmp;
    pint = (circular_list)pont/* casting */

One thought on “pseudo code for counting circular list

Leave a comment