Question

In: Computer Science

If you have an application that only needs to retrieve items from a very large dictionary,...

If you have an application that only needs to retrieve items from a very large dictionary,

and it never needs to insert or delete new items, which implementation would be the

most efficient? Justify your assertion.

Solutions

Expert Solution

solution:

I would suggest you to go with B-Tree or Red-Black Tree or AVL Tree.
The average access time for all the above data structures is theta(log n)
The worst case access time is also O(log n).

Not only access but also search, insertion, deletion is also same in both the cases.


Related Solutions

Modify your program from Learning Journal Unit 7 to read dictionary items from a file and...
Modify your program from Learning Journal Unit 7 to read dictionary items from a file and write the inverted dictionary to a file. You will need to decide on the following: How to format each dictionary item as a text string in the input file. How to covert each input string into a dictionary item. How to format each item of your inverted dictionary as a text string in the output file. Create an input file with your original three-or-more...
If you select a random sample of 15 items from a large batch in which there...
If you select a random sample of 15 items from a large batch in which there 10% defective items, what is the chance you find more than one defective items in the sample?
compute the timescale needed for the sun to have contracted from a very large size down...
compute the timescale needed for the sun to have contracted from a very large size down to todays size
20 Items were randomly selected from a large inventory. If 10% of the items in the...
20 Items were randomly selected from a large inventory. If 10% of the items in the inventory are made in Asia, 1. What is the probability that exactly 4 of the 20 items selected are made in Asia? (2 Points) 2. What is the probability that at most 4 of the 20 items selected are made in Asia? (2 Points)
You work for a very large engineering consulting firm. You have been asked to look at...
You work for a very large engineering consulting firm. You have been asked to look at the viability of the company purchasing a private jet to fly staff to project sites around the world. A new Gulfstream G450 currently costs $40,000,000. Assume a 15-year service life, a salvage value of $24,000,000, annual costs of $2,500,000/year, and annual benefits of $3,500,000/year (time saved, increased business), a corporate tax rate of 40%, a CCA rate of 25%, and an after-tax MARR of...
You work for a very large engineering consulting firm. You have been asked to look at...
You work for a very large engineering consulting firm. You have been asked to look at the viability of the company purchasing a private jet to fly staff to project sites around the world. A new Gulfstream G450 currently costs $40,000,000. Assume a 15-year service life, a salvage value of $24,000,000, annual costs of $2,500,000/year, and annual benefits of $3,500,000/year (time saved, increased business), a corporate tax rate of 40%, a CCA rate of 25%, and an after-tax MARR of...
You work for a very large engineering consulting firm. You have been asked to look at...
You work for a very large engineering consulting firm. You have been asked to look at the viability of the company purchasing a private jet to fly staff to project sites around the world. A new Gulfstream G450 currently costs $40,000,000. Assume a 15-year service life, a salvage value of $24,000,000, annual costs of $2,500,000/year, and annual benefits of $3,500,000/year (time saved, increased business), a corporate tax rate of 40%, a CCA rate of 25%, and an after-tax MARR of...
You work in a very large metropolitan police department and have been assigned to a committee...
You work in a very large metropolitan police department and have been assigned to a committee to select new patrol cars. Three models are in contention. The Dodge Charger The Chevrolet Tahoe The Ford Interceptor Your initial testing determines that all three models meet your department’s basic needs and that they are all comparably priced. So, the final decision really is based on the personal preference of the officers. You and the members of your committee send out a simple...
Using MongoDB, what command would you enter to retrieve this document using only the zip code...
Using MongoDB, what command would you enter to retrieve this document using only the zip code 11242? db.inspections.find(???????) Database: city Collection: inspections {"_id":{"$oid":"56d61033a378eccde8a898ae"}, "id":"23536-2015-ENFO", "certificate_number":5373970, "business_name":"NZO CORP.", "date":"Apr 22 2015", "result":"Violation Issued", "sector":"Grocery-Retail - 808", "address":{"city":"BROOKLYN", "zip":11242, "street":"COURT ST", "number":26}}
Recall that Benford's Law claims that numbers chosen from very large data files tend to have...
Recall that Benford's Law claims that numbers chosen from very large data files tend to have "1" as the first nonzero digit disproportionately often. In fact, research has shown that if you randomly draw a number from a very large data file, the probability of getting a number with "1" as the leading digit is about 0.301. Now suppose you are an auditor for a very large corporation. The revenue report involves millions of numbers in a large computer file....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT