全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1691
推到 Plurk!
推到 Facebook!

data structures problems

尚未結案
blackskin
一般會員


發表:1
回覆:0
積分:0
註冊:2004-12-18

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-12-18 21:41:22 IP:218.172.xxx.xxx 未訂閱
I have some questions about data structure, please help me solve these problems with pseudo-code, thanks a lot! : 1.Describe an efficient data structure for implementing the "bag" ADT, which supports a method add(e), for adding an element e to the bag, and a method remove(), which removes an arbitrary element in the bag. Show that both of these methods can be done in O(1) time. 2.Give the pseudo-code description for performing a removal from a hash table that uses linear probing to resolve collisions where we don't use a special marker to represent deleted elements. That is, we must rearrange the contents of the hash table so that it appears that the removed entry was never inserted in the first place. 3.Let T and U be (2,4) trees storing n and m entries, respectively, such that all the entries in T have keys less than the keys of all the entries in U. Describe an O(logn logm) time method for joining T and U into a single tree that stores all the entries in T and U. 我是趙婷
------
我是趙婷
GGL
資深會員


發表:104
回覆:600
積分:335
註冊:2006-11-05

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-12-20 21:47:23 IP:211.76.xxx.xxx 未訂閱
你這個應該是資料結構的習題之類的吧,如果看課本還是不知道怎麼寫的話去Google找找看吧,如果是習題應該都可以找到答案,當然,如果想要增進自己的實力,你還是自己看看書,試試看能不能寫出來
系統時間:2024-05-02 11:52:10
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!