## Question 1 What is the maximum capital for the following input? `k` = 2 `c` = 1 `capitals` = [1, 2, 3] `profits` = [2, 3, 5] ### Options 1. 6 Incorrect ---------------------------- 2. 5 Incorrect ---------------------------- 3. 8 Correct Our initial capital is 1, so we’ll choose the first project containing profit = 2. This capital will be added to the initial capital, increasing the total capital to 3. The second selected project will be the third project in the capitals array, because it’s a maximum between 3 and 5. Therefore, 3 + 5 = 8, which is our maximum capital. ---------------------------- 4. 10 Incorrect ---------------------------- --------------------------------------------- ## Question 2 What is the maximum capital for the following input? `k` = 1 `c` = 3 `capitals` = [0, 2, 3, 4] `profits` = [7, 3, 5, 2] ### Options 1. 5 Incorrect ---------------------------- 2. 8 Incorrect ---------------------------- 3. 7 Incorrect ---------------------------- 4. 10 Correct Our initial capital is 3, so we have 3 options (0, 2, 3) to select the project. We'll select 0, since 7 is the maximum profit that can be obtained. Therefore, the maximum capital becomes 10. ---------------------------- --------------------------------------------- ## Question 3 What is the maximum capital for the following input? `k` = 2 `c` = 2 `capitals` = [1, 1, 2, 4] `profits` = [2, 3, 5, 8] ### Options 1. 15 Correct For our initial capital, we have three options (1, 1, 2) to select the first project. We'll select 2, since 5 is the maximum profit that can be obtained. Now, our new capital becomes 2 + 5 = 7. Then, we'll choose the fourth project containing profit = 8. Therefore, the maximum capital becomes 7 + 8 = 15. ---------------------------- 2. 13 Incorrect ---------------------------- 3. 10 Incorrect ---------------------------- 4. 8 Incorrect ---------------------------- --------------------------------------------- ## Question 4 What is the maximum capital for the following input? `k` = 4 `c` = 1 `capitals` = [0, 3, 5, 7, 9, 10] `profits` = [2, 3, 6, 4, 1, 5] ### Options 1. 19 Incorrect ---------------------------- 2. 20 Incorrect ---------------------------- 3. 17 Correct The first project in the profits array will be selected as the first project, because the initial capital is 1. Both capitals will be added, and the current capital will become 3. As a result, the second project in the profits array will be selected as the next project containing profit = 3. It will be added to the previous capital, resulting in a new capital of 6. As a result, 6 will be selected as the third project. It will be added to the previous capital, and the new capital is now 12. Now, among 4, 1, and 5, we’ll select 5 as the fourth project. 12 + 5 = 17. Therefore, the maximum capital is 17. ---------------------------- 4. 16 Incorrect ---------------------------- ---------------------------------------------