please check my code and explain where iam doing wrong…dont give me any different approach
One testcase failing
Hello @dbhavanishankar89,
Your code is working wrong for the test cases like:
4
8 15 3 7
Expected Output:
7+15 = 22
Your Output:
15
Please, refer to the last video of Dynamic Programing i.e. Dynamic Programming - Optimal Game Strategy for better understanding of the logic.
Hope, this would help.
Give a like, if you are satisfied.