Find the length of a linked list using recursion
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Data structure used:
Singly linked list where each node contains a data element say data, and the address of the immediate next node say next, with head holding the address of the first node.
Steps:
Declare a global variable l=0
Pseudo code:
C code:
Output