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

Have you ever entered a room to retrieve an object, only to forget why you went...
Have you ever entered a room to retrieve an object, only to forget why you went into the room in the first place? Your short-term memory betrayed you. Have you ever been introduced to several people in quick succession, instantly forgetting their names? Again, your short-term memory was to blame. Short-term memory is limited in duration: Information retained for a period of seconds soon vanishes if not repeated or rehearsed. It is also limited in capacity: as new information enters...
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...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT