Question 4 – Greedy Method You are given a list of tasks to choose from. Each task takes a required amount of time to finish and has a corresponding reward. You have one day to work on the selected tasks. (1) (1.5 points) If you want to maximize the total rewards, can you use greedy method? If yes, give a strategy; otherwise explain why it does not work or give a counter example. (2) (1.5 points) If you want to finish the maximal number of tasks, can you use greedy method? If yes, give a strategy; otherwise explain why it does not work or give a counter example. (3) (2 points) Which data structure can be used to implement greedy method efficiently? What is the time complexity of a greedy method for an input size of n?
Blog
Phantom images most commonly occur when the tube motion is _…
Phantom images most commonly occur when the tube motion is ____ to the long axis of the structure.
Which are characteristics of type O+ blood?
Which are characteristics of type O+ blood?
If an individual’s respiratory rate decreases, then blood CO…
If an individual’s respiratory rate decreases, then blood CO2 levels
Which of the following leukocytes are considered granulocyte…
Which of the following leukocytes are considered granulocytes?
Which of the following organs contains endocrine tissue, but…
Which of the following organs contains endocrine tissue, but is NOT considered an “endocrine gland?”
Identify the reproductive structure outlined/indicated by th…
Identify the reproductive structure outlined/indicated by the black lines.
Which of the following statements about thrombocytes are cor…
Which of the following statements about thrombocytes are correct?
Which type of hormones require a carrier protein in the bloo…
Which type of hormones require a carrier protein in the blood?
Which of the following is the region of the thoracic cavity…
Which of the following is the region of the thoracic cavity where the heart is located?