Double a Number Represented as a Linked List
Medium · Linked Lists · about 15 minutes
Asked at Amazon, Google, Meta.
A non-negative integer is stored in a linked list, most significant digit first, with no leading zeros (except 0). Return the list representing twice the number.