I think this test case is wrong. Can someone explain to me why the expected is [0,1]?
For this question the output should also be a linked list. So the representation of the number 10 in linked list format will be 0->1. Also since the question mentions that linked list stores the numbers in reverse manner the answers is [0,1] i.e 0->1 instead of 1->0 ie [1,0]