For each of the following scenarios, choose the best sorting algorithm(s) from the list below. Then,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
For each of the following scenarios, choose the best sorting algorithm(s) from the list below. Then, justify your choice by describing what properties of that sorting algorithm make it the best choice, and why those properties are useful in this particular scenario. Maximum Length Per Question: 2-3 sentences. Sorting algorithms: Insertion sort, Selection sort, Heap sort, Merge sort, Quick Sort Q4.1 Game Programming 3 Points You are a game programmer in the 1980s who is working on displaying a sorted list of enemy names that a player has encountered during their gameplay. Since it is a game, you want to display the names of the enemies as fast as possible, but because it is the 1980s, your customers are used to and will be okay with occasional slow loading times. Additionally, the game is intended to run normally on consoles that don't have much memory available. Imagine that you are sorting a small set of computer files by their file name. You realize, however, that each computer file is huge and takes up a lot of disk space, so you do not want to copy excessively when sorting. In fact, even just moving and rearranging these large files is expensive, so you don't want to move them often. (Hint: You may find it useful to refer to visuals of the sorting algorithms. Lecture slides and https://visualgo.net/en/sorting are good resources for remembering these general ideas.) Imagine that you are a NASA software engineer. You're assigned a task to sort data you receive from a probe on Mars, in which each piece of data includes time and temperature. The sensors on this probe capture very large amounts of data. The data is already given to you in sorted order of earliest to latest time, but you want to sort them by temperature, where ties in temperature are ordered by time. For each of the following scenarios, choose the best sorting algorithm(s) from the list below. Then, justify your choice by describing what properties of that sorting algorithm make it the best choice, and why those properties are useful in this particular scenario. Maximum Length Per Question: 2-3 sentences. Sorting algorithms: Insertion sort, Selection sort, Heap sort, Merge sort, Quick Sort Q4.1 Game Programming 3 Points You are a game programmer in the 1980s who is working on displaying a sorted list of enemy names that a player has encountered during their gameplay. Since it is a game, you want to display the names of the enemies as fast as possible, but because it is the 1980s, your customers are used to and will be okay with occasional slow loading times. Additionally, the game is intended to run normally on consoles that don't have much memory available. Imagine that you are sorting a small set of computer files by their file name. You realize, however, that each computer file is huge and takes up a lot of disk space, so you do not want to copy excessively when sorting. In fact, even just moving and rearranging these large files is expensive, so you don't want to move them often. (Hint: You may find it useful to refer to visuals of the sorting algorithms. Lecture slides and https://visualgo.net/en/sorting are good resources for remembering these general ideas.) Imagine that you are a NASA software engineer. You're assigned a task to sort data you receive from a probe on Mars, in which each piece of data includes time and temperature. The sensors on this probe capture very large amounts of data. The data is already given to you in sorted order of earliest to latest time, but you want to sort them by temperature, where ties in temperature are ordered by time.
Expert Answer:
Answer rating: 100% (QA)
Q41 Game Programming For displaying a sorted list of enemy names in a game from the 1980s where occasional slow loading times are acceptable and memory is limited the best sorting algorithm to use wou... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
I dentify the reason ( s ) why the claim was or was not compensable. Support your work with the text and the use of 3 other technical sources ( books , technical papers, peer - reviewed journal...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
A long, slender bar in the shape of a right circular cone with length L and base diameter d hangs vertically under the action of its own weight (see figure). The weight of the cone is W and the...
-
The two-winding magnetic circuit of figure has a winding on a fixed yoke and a second winding on a moveable element. The moveable element is constrained to motion such that the lengths of both air...
-
Quality Environmental, Inc., needs funds, and Martha Beard, the president, has asked you to consider investing in the business. Answer the following questions about the different ways that Beard...
-
How should chemical energy be classified in Figure 7.10? Figure 7.10 Classification of energy. COHERENT (mechanical energy) kinetic energy 7cm 70 INCOHERENT (thermal energy, source energy) ENERGY OF...
-
Central Pennsylvania Limestone Company produces thin limestone sheets used for cosmetic facing o n buildings. The following income statement represents the operating results for the year just ended....
-
11. If a,b,x,ye R,@ #1, is a cube root of unity and (a+b)=x+yo, then (b+aw)' equals: (a) y+x@ 6 (c) -y-xw 12. The value of S = sin- -icos- (c) y+yw (d) -x-ya 2k is: 7 (c)-i (d) i , then value of...
-
Alice J. and Bruce M. Byrd are married taxpayers who file a joint return. Their Social Security numbers are 123-45-6789 and 111-11-1111, respectively. Alice's birthday is September 21, 1966, and...
-
Find a formula for the power series of f(x) = 6 ln (1 + x), 1 < x < 1 in the form 6 n=1 an. Hint: First, find the power series for g(x) = Then integrate. 1 + x (Express numbers in exact form. Use...
-
The Poisson distribution is often used with a. R-charts. b. p-charts. c. c-charts. d. x-charts.
-
A decision maker who gets less utility from a greater risk and avoids situations in which high losses might occur is a. indifferent to risk. b. a risk seeker. c. a risk avoider. d. a rational...
-
Which are common probability distributions for populations? a. normal distributions b. beta distributions c. uniform distributions d. all of the above
-
Which world regions are forecast for the fastest air travel growth? Why are these regions expected to grow more rapidly than others?
-
The product of a vector of state probabilities and the matrix of transition probabilities will yield a. another vector of state probabilities. b. a meaningless mess. c. the inverse of the equilibrium...
-
Mango 4 7 My Campus DATE / 5 6 The following table shows there Bundles of Oranges and Mangoes for Joustin & do nal'd. each of them is in differens Bundles between the theek Justin prianges 19 14 10...
-
A copper sphere of 10-mm diameter, initially at a prescribed elevated temperature T;, is quenched in a saturated (1 atm) water bath. Using the lumped capacitance method, estimate the time for the...
-
The United Steelworkers of America and Kaiser Aluminum entered into a master collective bargaining agreement covering terms and conditions of employment at fifteen Kaiser plants. The agreement...
-
An Arkansas statute provides that if any foreign corporation authorized to do business in the State should remove to the Federal court any suit brought against it by an Arkansas citizen or initiate...
-
Jane Jones, a married woman, applies for a credit card from Exxon but is refused credit. Jane is bewildered as to why she was turned down. What are her legal rights in this situation?
-
With regard to genotypes, what is a true-breeding organism?
-
An individual has the genotype Aa Bb Cc and makes an abnormal gamete with the genotype AaBc. Does this gamete violate the law of independent assortment or the law of segregation (or both)? Explain...
-
A true-breeding tall pea plant was crossed to a true-breeding dwarf plant. What is the probability that an F1 individual will be truebreeding? What is the probability that an F1 individual will be a...
Study smarter with the SolutionInn App