assume the numbers you need to add are 560 and 890. the result should be 1450.

so linked list A will have 5 -> 6 -> 0

and linked list B will have 8 -> 9 -> 0

so you must add them together to produce 1 -> 4 -> 5 -> 0.

i believe the reason for an algorithm like this is to have a method of adding arbitrarily large numbers together. rather than storing an integer as int32 or int64, we can store the int as a linked list, which can be any size integer we want. Of course, the underlying 'int' we use for the data of the linked list only needs to be 4 bits to cover 0-9 in decimal.

Is this to remove duplicates from linked list or just combining both the linked lists blindly?