About the bottom up approach

why will the diagonal elements of the dp matrix be filled with 0 in the bottom up approach? I mean when only 1 coin left in array as indicated by the diagonal elements of the dp matrix the player will pick that coin to win the game thn why are we filling the diagonal elements of dp matrix with 0?

Hey @Senjuti256
Yes we will put elements there according to me as well.
Sir might have implemented it accordingly because he is considering 0 at diagonals