AT&T interview question

How to tell when a node list ends.