subject

Assume that you need to keep track of some data. To store those data, you have the following options: a. A linked list maintained in sorted order.
b. A linked list of unsorted records.
c. A binary search tree.
d. An array maintained in sorted order.
e. An array of unsorted records.

For each of the following scenarios, which of above choices would be the best (i. e. you will pick)

1. The records are guaranteed to arrive already sorted from lowest to high- est (i. e., whenever a record is inserted, its key value will always be greater than that of the last record inserted). A total of 1000 inserts will be interspersed with 1000 searches.
2. The records arrive with values having a uniform random distribution (so the BST is likely to be well balanced). 1,000,000 insertions are performed, followed by 10 searches.
3. The records arrive with values having a uniform random distribution (so the BST is likely to be well balanced). 1000 insertions are interspersed with 1000 searches.
4. The records arrive with values having a uniform random distribution (so the BST is likely to be well balanced). 1000 insertions are performed,

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Aletter or menu command that starts an action when the user presses the designated letter and the alt key together is called what?
Answers: 1
question
Computers and Technology, 22.06.2019 12:00
Which of the following “invisible” marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
question
Computers and Technology, 22.06.2019 19:50
Write a car class having two private member variables called tank and speed. write public methods called pumpgas and gofast. the method pumpgas gets an integer for gas that must be pumped. that value needs to be added to tank (no more than 20 gallons). it must return the amount of gas that is purchased ($4 per gallon). the method gofast should increase the speed by 5 each time it is called.write a constructor for the above class that initialized both variables to zero.write a tostring to display both the tank and speed when the car is printed.modify the car class to implement the interface comparable and an interface called carinter having the public methods in carinter.write the main program to create an array of size 5 of type car. create 5 car objects having each location of the array to refer to one of the cars. test the pumpgas, gofast, equals method on the array items. write an enhanced loop to print all the car values (using a tostring written last time).write a generic method to find the minimum of four items. pass int, double, char, string and car objects to test this method.
Answers: 1
You know the right answer?
Assume that you need to keep track of some data. To store those data, you have the following options...
Questions
question
Mathematics, 16.09.2019 04:30
question
Mathematics, 16.09.2019 04:30
question
Advanced Placement (AP), 16.09.2019 04:30