If there is an iterative way, there must be a recursive way.
int count_rec(LINK head){ if (head == NULL) return 0; else return (1 + count_rec(head -> next));}
Post a Comment
No comments:
Post a Comment