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

guest (Sean)
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.
2001-7-24 -05:00

回到话题: 看了#142300,也来贴一道MS研究所在中国招聘的考题......

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论