solution 1: linked list op, math