please explain problem more
Problem not clear
@Aamir_Aamir
There is an array of coins with different values. The first index is 0 and the last index is (n - 1). The players can either pick the first coin of the array or the last element of the array. Optimally means that both the players play to maximize their profits.
If my answer is able to resolve your query, please mark the doubt as resolved.