-2
我需要知道如何执行一些基本的列表操作,我们需要将其中一个算法颠倒过来,另一个我们需要拆分列表,并且它只需要伪代码列表上的操作ADT
这里是写在混合算法
Algorithm reverse (rList)
Pre: rList :: refToList
Post: order of the the elements in rList are reversed
Return: nothing
Algorithm split(rList)
Pre: rList :: refToList
Post: rList keeps half of its elements, creates new list for the other half
Return: a new refToList containing the other elements
欢迎来到Stack Overflow!您可能想要查看[问]以了解您为什么被低估。通常情况下,如果问题更具体,并且包含迄今为止尝试的问题,问题会得到更好的答复。 – APH