Object-Oriented Programming · Bloomberg · Medium
You are given the heads of two singly linked lists, l1 and l2. Each node stores a single decimal digit (0 through 9). The digits are arranged in forward (most-significant-first) order — the first node holds the highest place value, and the last node holds the units digit. Your task is to add the two numbers and return the sum as a new singly linked list, also in forward order. You must define the ListNode structure yourself and write your own test cases. Solve the problem…
Checking your access…