×

Loading...

A possible max length is not the actual the length of node.

It's a possible max length. F.g. A node need 12 bytes. In a XXMbytes memory computer, we can set the possible max length to use up all the memory of the computer. That's XXM/12bytes.

We go throught the list, and count the number of the node, if the number is larger then the value XXMbytes/12bytes, we can say there is a cirle in the list.

Because we don't need other more memory, and just go throught the list, and count the number. we don't need tough cpu time.
Report