Sum Numbers in a Linked List

This lesson will teach you how to calculate the sum of numbers in a linked list using recursion.

Sum n numbers

When given a linked list, sum the values of all the nodes and then return the sum.

The following illustration explains this concept:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.