Suppose you are asked to design a data structure for hosting information of a set of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Suppose you are asked to design a data structure for hosting information of a set of open-source software project contributors. Each contributor has a set of attributes, including user-id (unique), user name, and a numeric score indicating the contributor's experience (100, 110, etc.) The data structure should be able to support highly efficient search and edit by user id. For instance, we would like to modify a user's score or its user name. The data structure should also support a highly efficient search by score. For instance, quickly return users with a score within [100,200]. Answer the following two questions: 1. how would you design such a data structure? Briefly explain your design concerns. Sub-optimal design won't get full marks. 2. what is the time complexity (big-O) of your designed data structure for getting the user names having a score within [n, m]? Briefly explain how you get the big-O result. Suppose you are asked to design a data structure for hosting information of a set of open-source software project contributors. Each contributor has a set of attributes, including user-id (unique), user name, and a numeric score indicating the contributor's experience (100, 110, etc.) The data structure should be able to support highly efficient search and edit by user id. For instance, we would like to modify a user's score or its user name. The data structure should also support a highly efficient search by score. For instance, quickly return users with a score within [100,200]. Answer the following two questions: 1. how would you design such a data structure? Briefly explain your design concerns. Sub-optimal design won't get full marks. 2. what is the time complexity (big-O) of your designed data structure for getting the user names having a score within [n, m]? Briefly explain how you get the big-O result.
Expert Answer:
Related Book For
Introduction to Data Mining
ISBN: 978-0321321367
1st edition
Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Q Ltd prepares accounts to 31 March each year. The company made the following two disposals of chargeable assets during the year to 31 March 2021: (1) 1,250 shares in Hentic Ltd were sold on 28 June...
-
Discuss the major similarities and differences between the behavioral and contingency leadership theories.
-
In its annual report to stockholders, Crantz Inc. presents a condensed balance sheet with detailed data provided in supplementary schedules. 1. From the adjusted trial balance of Crantz, prepare the...
-
Wire 1 is \(2.3 \mathrm{~m}\) long and carries a current of \(2.2 \mathrm{~A}\) to the right. Wire 2 is also \(2.3 \mathrm{~m}\) long, and it carries a current of 3. 0 A to the left. The wires are...
-
The following accounting events affected Nelson Manufacturing Company during its first three years of operation. Assume that all transactions are cash transactions. Transactions for 2013 1. Started...
-
a) Explain the difference between quantum Mechanics and Classical Mechanics b) Explain the Bohr's form of quantization of Energy [4 mks] [3 mks] c) Calculate the penetration distance for a very small...
-
B52 Skate Training prepares adjustments annually and showed the following on its June 30, 2023, year-end: Additional information available at year-end: a. The Prepaid Arena Rental of $182,000 was...
-
A student is investigating the boiling and freezing point of a liquid, He observes the liquid in the apparatus while he gently heats the flask with a Bunsen burner flame. The liquid and its vapour...
-
In the accommodations market, Airbnb appears to have a significant advantage over its competitors as it relates to regulations affecting the operations of its business. Develop a business strategy...
-
1 a) Carlos Company began the month with $4,000 in raw materials inventory. If the company purchased $28,000 of materials during the month, what is the company's cost of goods available for use...
-
DISCUSSION QUESTIONS 1. Traditionally, human resource management practices were developed and administered by the company's human resource department. Line managers are now playing a major role in...
-
A vendor ships goods to a customer on credit but does not have previous credit experience with this customer. Define at least two research questions for each scenario posed by the exercise.The...
-
Organizational data involved with the fulfillment process are: Material Mater (part number, delivering plants, sales units etc), Customer master data (name, address, account number, payment terms,...
-
Gol started in 2001 by not offering frequent flyer programs, airport clubs, and food services. Some 15 years later it is venturing into these services with its Smiles frequent flyer program and...
-
Compare and contrast licensing and subcontracting.
-
Given the Bayesian network shown in Figure 5.4, compute the following probabilities: (a) P(B = good, F = empty, G = empty, S = yes). (b) P(B = bad, F = empty, G = not empty, S = no). (c) Given that...
-
(a) List all the 4-subsequences contained in the following data sequence: < {1, 3} {2} {2, 3} {4} >, assuming no timing constraints. (b) List all the 3-element subsequences contained in the data...
-
Describe how a box plot can give information about whether the value of an attribute is symmetrically distributed. What can you say about the symmetry of the distributions of the attributes shown in...
-
Calculate: (a) \(f=a /(b c)\), where \(a=2.34\mathrm{~mm}^{2}, b=54.26\mathrm{~m}\), and \(c=0.14\mu \mathrm{m}\); (b) \(g=k t^{3}\), where \(k=1.208\times 10^{-2}\mathrm{~s}^{-3}\) and...
-
Which of these is a hierarchical approach of subordination of individuals that work together and contribute to serve a common goal? Formal organization Informal structures Functional structure ...
-
Organization is viewed as a/an ________ process and a management activity, which is crucial for predicting the consumption of a companys resources. Active Passive Intermediary None of the above
Study smarter with the SolutionInn App