作者iFEELing (ing)
站内Programming
标题Re: [求助]会计概或演算法 资料结构的大大 帮忙一下
时间Tue May 22 09:20:08 2007
※ 引述《[email protected] (雨伞跟我赌气)》之铭言:
: 如题
: 有两题
: 第1题是:Design a procedure for combining two sorted contiguous lists into a single sorted contiguous list.What if the lists are linked?
: 中文是:设计一程序来结合二个以排序过的连续串列为单一依序排列的连续串列,若串列是链结串列,其演算法又如何?
marge sort
两边抓比较小的那个拿出来
一直到其中一边空掉 把另一边的接到後面
如果是linked list 就是link的操作而已
: 第2题是:Design a procedure to compare the contents of two stacks.
: 中文是:试设计一程序,比较两堆叠之内容?
: 我完全卡死不会希望知道的大大能帮忙写出来 !!谢谢 急用
跟上面类似想法
两边各抓一个来比
不过 现在已经快六月了 学期应该快底了 ...现在弄不清楚这个的话要拿学分有点困难吧
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.134.60.58