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 */
Advertisements

One thought on “pseudo code for counting circular list

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s