Calvin's Game - 2 testcases failing

pls help me out ,where am i going wrong?

hey,I am not proficient with python .I can help you with c++/java.
i can give you the best approach

Forward * = Max score, if we move forward from K to i, for all K <= i <= N.
Backward βˆ— = Max score if we move backward from i to 1, for all K <= i <= N.

Ans = Max (Forward* + Backward*) for all K <= i <= N.

Make sure to include the case in which you don’t move forward at all.

if you still have doubts let me know :slight_smile: