You are given a receiver of length k.
There are x holds the ball, they pass it directly to player receiver[x].
The game starts by selecting any player i (i. The ball is then passed exactly k times. Whenever the ball is passed to player receiver[x], the value receiver[x] is added to the current score.
Return the maximum possible score achievable after k passes by choosing the optimal starting player.
Constraints:
receiver.length
receiver[i]
k
You are given a receiver of length k.
There are x holds the ball, they pass it directly to player receiver[x].
The game starts by selecting any player i (i. The ball is then passed exactly k times. Whenever the ball is passed to player receiver[x], the value receiver[x] is added to the current score.
Return the maximum possible score achievable after k passes by choosing the optimal starting player.
Constraints:
receiver.length
receiver[i]
k