Amazon Interview Question

Converting from linked list to int