Let $P$ be a matrix of order $ 3 \times 3$ such that all the entries in $P$ are from the set $\{–1, 0, 1\}$. What is the maximum possible value of the determinant of $P$?
This question is from JEE ADVANCED 2018, paper 2
My Attempt: $det(P)$=$$ \begin{vmatrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \\ \end{vmatrix}$$ $$a_1(b_2c_3 – b_3c_2)– a_2(b_1c_3 – b_3c_1) + a_3(b_1c_2 – b_2c_1)\le6$$
value can be 6 only if $a_1 = 1, a_2 = \ –1, a_3 = 1 , b_2c_3 = b_1c_3 = b_1c_2 = 1 , b_3c_2 = b_3c_1 = b_2c_1 = \ – 1$ and $(b_2c_3) (b_3c_1) (b_1c_2) = \ – 1$ and $ (b_1c_3)(b_3c_2) (b_2c_1) = 1$
i.e $b_1b_2b_3c_1c_2c_3 = 1$ and $– 1$ hence not possible Similar contradiction occurs when$ a_1 = 1, a_2 = \ –1, a_3 = 1, b_2c_2 = b_3c_1 = b_1c_2 = 1, b_3c_2 = b_3c_1 = b_2c_1 =\ – 1$
Now for value to be $5$ one the terms must be zero but that will make $2$ terms zero which means answer cannot be $5$ Now,$$ \begin{vmatrix} 1 & 0 & 1 \\ -1 & 1 & 1 \\ -1 & -1 & -1 \\ \end{vmatrix} =4$$ Hence max value = $4$
I need the best way to solve this question(the process through which this question could be done in the least time possible and it should not be similar to my approach (i.e any approach other than substitution and checking)

This really isn't the quickest way to solve the problem if you need to write it down, but it's rather efficient if you do it mentally.
Let us relax the domain of the entries of $P$ to the interval $\mathcal I=[-1,1]$ first. If we keep the two last two columns of $P$ fixed, $\det(P)$ is a linear function of the first column. Therefore, when the first column of $P$ ranges over $\mathcal I^3$, the maximum of $\det(P)$ is attainable at a vertex of the cube $\mathcal I^3$. It follows that if $P_0$ is a global maximiser of $\det(P)$ over $\{P:p_{ij}\in\mathcal I\}$, we can always modify its entries on first column to $\pm1$ to obtain a new global maximiser. By doing the similar to the second and the third columns, we obtain a global maximiser whose elements are all equal to $\pm1$. It follows that \begin{aligned} &\max\{\det(P):P\in M_3(\mathbb R):p_{ij}\in\{-1,0,1\}\}\\ \le&\max\{\det(P):P\in M_3(\mathbb R):p_{ij}\in\mathcal I\}\\ =&\max\{\det(P):P\in M_3(\mathbb R):p_{ij}\in\{-1,1\}\}\\ \le&\max\{\det(P):P\in M_3(\mathbb R):p_{ij}\in\{-1,0,1\}\}. \end{aligned} Hence all maxima in the above are equal and we may consider only those matrices $P$ whose entries are equal to $\pm1$. By Laplace expansion along the first row, the determinant of such a $P$ must be even. Also, by Hadamard's determinant inequality, $\det(P)\le\|p_{\ast1}\|\|p_{\ast2}\|\|p_{\ast3}\|=3\sqrt{3}<6$. Hence $\det(P)$ is at most $4$. Since $$ \det\pmatrix{-1&1&1\\ 1&-1&1\\ 1&1&-1}=4, $$ we conclude that $\max\{\det(P):P\in M_3(\mathbb R):p_{ij}\in\{-1,0,1\}\}=4$.
Remark. If you are familiar with the Hadamard maximum determinant problem, there is also a standard trick to prove that the determinant of an $n\times n$ $\{-1,1\}$-matrix is $\frac{1}{2^{n-1}}$ times the determinant of an $(n-1)\times(n-1)$ $\{0,1\}$-matrix. Since the maximum determinant of a $2\times2$ $\{0,1\}$-matrix is obviously $1$, we have $\max\{\det(P):P\in M_3(\mathbb R):p_{ij}\in\{-1,1\}\}=4$. But we shall not use this trick here because it will make the answer even longer.