Length of LL (recursive)

 Given a linked list, find and return the length of input LL recursively.

Input format :
Linked list elements (separated by space and terminated by -1)
Output format :
Length of LL
Sample Input :
3 4 5 2 6 1 9 -1
Sample Output :
7

Comments

Popular posts from this blog

MySQL Multi Source Master Slave Replication using GTID

Setting Up PostgreSQL Logical Replication with Docker Compose

Regex 101: An Introduction to Regular Expressions for Developers