Please tell me how I should apply minimax algorithm to the array $$ 15, 12, 14, 16, 11, 13$$ and make a tree?(I understand how minimax algorithm works but I can't apply it to an array)
Minimax is actually applied on a 2D matrix like:
3 5 6 13 8 7 9 2 4 6 4 12 15 16 10
Generally, you have a choice to do, let say it corresponds to one of the columns in the exemple (5 choices). And there is an unpredictable choice (random, opponent choice ...), the row in the example (3 choices). Minimax minimizes the risks by assuming this unpredictable choice will be the worst for you.
In the example, you first compute the minimum on all colums:
3 5 2 4 6
So you finally pick the 5th choice, which guarantees at least 6.
In your problem you have 1 dimension, then minimax has no sense on it. Or you can degenerate it saying there is no unpredictable variable and just pick the maximum.