data structures problems |
尚未結案
|
blackskin
一般會員 發表:1 回覆:0 積分:0 註冊:2004-12-18 發送簡訊給我 |
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 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |