Question: Problem 7 ( bonus question up to 1 0 points; data structure and algorithm ) We are given a collection C of n integer keys

Problem 7(bonus question up to 10 points; data structure and algorithm) We are given a collection C of n integer keys (where nis relatively large, say 1 million) that we can store however we like. We want to use this collection to answer queries of the form given a key k(which may or may not be in C), find all the keys in C that are at a distance d0 or less from k, i.e., return the set {k in C:|kk| d}(this is called a range search).Assume the collection is static, i.e., the n keys stay the same and we dont insert or delete any keys. Describe an efficient data structure for C and an algorithm to do many range searches(no need to give pseudocode, but the description in English should be precise). Give the runtime T(n) to set up the data structure, and the runtime S(n, m) to do one range search assuming it returns m n keys

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!