December 26, 2018

Find length of a linked list using recursion

You can read about calculating length of a linked list by iterative method here. In recursion, the iterative loop or explicit loop is replaced by recursive function calls. In recursive calls, a stack is used to store values calculated during the recursion. And when stack unfolds, the recursion calls are replaced by those values. Let […]

Read more