You are given two non-negative numbers 'num1' and 'num2' represented in the form of linked lists.
The digits in the linked lists are stored in reverse order, i.e. starting from least significant digit (LSD) to the most significant digit (MSD), and each of their nodes contains a single digit.
Calculate the sum of the two numbers and return the head of the sum list.
Example :
Input:
'num1' : 1 -> 2 -> 3 -> NULL
'num2' : 4 -> 5 -> 6 -> NULL
Output: 5 -> 7 -> 9 -> NULL
Explanation: 'num1' represents the number 321 and 'num2' represents 654. Their sum is 975.
Input Format:
The first line contains a single integer 'm', the number of elements in 'num1'.
The second line contains 'm' integers, the elements of the first singly linked list / digits of 'num1'.
The third line contains a single integer 'n', the number of elements in 'num2'.
The fourth line contains 'n' integers, the elements of the second singly linked list / digits of 'num2'.
Output Format:
Return the sum linked list.
Note :
You do not need to print anything; it has already been taken care of. Just implement the given function.