Design a data structure that can be used instead of an array and avoids the "high-cost" (i.e. O(n)) of initializing the array. the data structure ought to holds n items and supports the following operations in O(1) time: * Init - Initializes the data structure to empty. * Set(i, x) - Sets item x at index i in the data structure. * Get(i) - Gets the item stored in index i (or 'empty' if nothing is there). Remark: the data structure should use O(n) space.
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
