×

Loading...

妙!我有一个笨办法,时间用的比较多。请指教!

birdincage (birdincage)
ln *a;
ln *b;
long i,j;//或 double i,j;

for (a=FIRST, i=0; a; a=a->next,i++)
{ for (b=FIRST, j=0; b!=a; b=b->next, j++);
if (j<i) return CLOSE;
}
return OPEN;

问题是节点个数要能够用double表示。
(#143796@0)
2001-7-24 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

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

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论