Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions