Algorithm to calculate the length of a list in recursive function
Aishwarya98:
Hope you are satisfied with my answer..
Answers
Answered by
0
Algorithm to calculate the length of the list in recursive function:
1. Initialize the count as zero
2. Initialize a node pointer , current = head
3. Do the following when current is not equal to NULL
a) current = current -> next
b) count++
4. return count..
Similar questions