Introduction
This Python challenge requires adding two numbers whose digits are stored in a linked list in reverse order.
This tutorial is from open-source community. Access the source code
This Python challenge requires adding two numbers whose digits are stored in a linked list in reverse order.
Given two non-circular, singly linked lists, add the values of each node in reverse order and return the result in a linked list in reverse order too. If one of the inputs is None, return None for an invalid operation. The numbers can fit in memory and we can assume we already have a linked list class that can be used for this problem.
To complete this challenge, the following requirements must be met:
The following examples demonstrate the usage of this challenge:
The linked list is non-circular and singly linked. The return value must be in reverse order. If one of the inputs is None, return None for an invalid operation. The numbers can fit in memory and we can assume we already have a linked list class that can be used for this problem.