-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