AT&T Interview Question

How to tell when a node list ends.