Education + Jobs Hiring Website - 2025
0 like 0 dislike
1,181 views
in Online Assessments by Expert (44,360 points) | 1,181 views

1 Answer

0 like 0 dislike
  1. Given a rehabilitation session cost A[] that represents cost at each day, number of required sessions X, and the required reset time between each two sessions Y. Find the minimum cost to have all required sessions satisfying the required rest time condition.

     

    Example: A = {4, 2, 3, 7}, X=2, Y=2

     

    answer should be 7 since the minimal cost to have two sessions with two days in between is to have the sessions at day 1, A[0] and day 3, A[2]

by Expert (44,360 points)