Question

In: Computer Science

1. Suppose you are implementing software to be used in a handheld device that checks whether...

1. Suppose you are implementing software to be used in a handheld device that checks whether event attendees are part of a group of people allowed access to a special session at the event. Guests can purchase access to the special session any time up to the instant the event begins, and the device receives updated records to ensure paying guests (only) are allowed in to the special session Would choosing a set data structure to manage the special session guests or a list be more efficient? Explain

Solutions

Expert Solution

Choosing a set data structure to manage the special session guests is more efficient than a list.Every guest data is unique hence we can store their data in a set. Checking for an item in a set is significantly faster than lists.So we can check whether the guest is allowed or not, faster with sets than lists .This is done by checking for guest data in set, if the guest is present in the set then he/she is allowed otherwise they are not allowed. Sets are implemented using hash tables,hence while searching for a member all it has to do is to check whether the member is present in the position determined by its hash. Here speed of operation does not depend on its size and elements in set are not stored in the order you add them. In case of lists if we want to search for an object we have to go through the entire list until we find the object,so it takes more time. Speed decreases as the size increases.


Related Solutions

1 ) Which of the followings is not a goal of the I/O software?    A. Device...
1 ) Which of the followings is not a goal of the I/O software?    A. Device independence B. Uniform naming C. Buffering D. Error handling E. Cost reduction 2) According to the data rate, which of the following is not true? A. SONET OC-768 network is faster than Gigabit Ethernet B. FireWire 800 is slower than USB 3.0 C. SCSI Ultra 5 bus is faster than Thunderbolt 2 bus D. Keyboard is slower than mouse 3) Which of the following...
Select a software system and / or a device that you are familiar with that either allows or requires the system’s software to be updated.
"Software and System Updates" Please respond to the following:Select a software system and / or a device that you are familiar with that either allows or requires the system’s software to be updated. This system could be specific software that sets on top of an operating system, the operating system itself, a mobile device, or video game consoles. Discuss how the update was applied to the system and describe the changes that the system / software update provided. In addition,...
1.Suppose you are implementing a new employee developmental plan. You are requested to design a complete...
1.Suppose you are implementing a new employee developmental plan. You are requested to design a complete form that you would use to implement this new program. Ensure that it contains all of the elements of a good developmental plan including employee’s personal particulars. 2.Now you are required to establish a personal developmental plan for yourself by filling ALL required information in the form that you have designed in Task 1. In your personal developmental plan, you have to cover the...
Linux Ubuntu 1. Use the appropriate commands to locate the device file used by the device,...
Linux Ubuntu 1. Use the appropriate commands to locate the device file used by the device, mount the filesystem to a directory of your choice, and check the filesystem for errors. 2. Finally, add a line to /etc/fstab to ensure that the filesystem can be easily mounted in the future (this line should not automount the filesystem at boot time). You have to document all your steps and provide the screenshot of your work process.
Suppose you are a high-level manager in a software firm and you are managing n software...
Suppose you are a high-level manager in a software firm and you are managing n software projects. You are asked to assign m of the programmers in your firm among these n projects. Assume that all of the programmers are equally competent. After some careful thought, you have figured out how much benefit i programmers will bring to project j. View this benefit as a number. Formally put, for each project j, you have computed an array Aj[0..m] where Aj[i]...
Discuss the major R&D approaches for implementing strategies. Discuss guidelines used to determine whether a firm...
Discuss the major R&D approaches for implementing strategies. Discuss guidelines used to determine whether a firm should conduct R&D internally or externally.
A pycnometer is a device used to measure densities. You are in the lab and need...
A pycnometer is a device used to measure densities. You are in the lab and need to measure the density of an unknown solid. The pycnometer is weighed empty and once again when it is filled with methanol at 18°C (the density of methanol at 18°C is 0.7914 g/mL). The following data is obtained:         Mass of the pycnometer: 127.111 g         Mass of the pycnometer and the methanol: 378.024 g The pycnometer is emptied and 17.66 g...
Suppose you want to determine whether the brand of laundry detergent used and the temperature affects...
Suppose you want to determine whether the brand of laundry detergent used and the temperature affects the amount of dirt removed from your laundry. To this end, you buy two different brand of detergent ( Super and Best) and choose three different temperature levels (cold, warm, and hot). Then you divide your laundry randomly into 6r piles of equal size and assign each r=4 piles into the combination of (Super and Best) and (cold,warm, and hot). super best cold 4,5,6,5...
Suppose you want to determine whether the brand of laundry detergent used or the temperature affects...
Suppose you want to determine whether the brand of laundry detergent used or the temperature affects the amount of dirt removed from your laundry. To this end, you buy two different brand of detergent (A and B) and choose three different temperature levels (“cold”, “warm”, and “hot”). Then you divide your laundry randomly into 12 piles of equal size and dirtiness and wash them in a combination of detergent and water temperature. The results you get are as follows, Grams...
1. You have the choice of selecting a networking device with WEP or a device with...
1. You have the choice of selecting a networking device with WEP or a device with WPA. Which offers better      security and why? 2. The term association is characterized by which of the following? a. Describe the MAC address of the client. b. Prevent excessive routing. c. Describe that a wireless connection has been obtained. d. Prevent unauthorized network access. 3. Wi-Fi is which of the following? a. The Wi-Fi Alliance, which is an organization that tests and certifies...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT