How to compute determinant of $n$ dimensional matrix? I have this example:
$$\left|\begin{matrix}
-1 & 2 & 2 & \cdots & 2\\
2 & -1 & 2 & \cdots & 2\\
\vdots & \vdots & \ddots & \ddots & \vdots\\
2 & 2 & 2 & \cdots & -1\end{matrix}\right|$$
When first row is multiplied by $2$ and added to second, to $nth$ row, determinant is:
$$\left|\begin{matrix}
-1 & 2 & 2 & \cdots & 2\\
0 & 3 & 6 & \cdots & 6\\
\vdots & \vdots & \ddots & \ddots & \vdots\\
0 & 6 & 6 & \cdots & 3\end{matrix}\right|$$
Now using laplace expansion on first column:
$$-\left|\begin{matrix}
3 & 6 &  \cdots & 6\\
\vdots & \vdots & \ddots & \vdots \\
6 & 6 &  \cdots & 3\end{matrix}\right|$$
Is it possible to get recursive relation?
What to do next?
Thanks for replies.

Your recursive approach is fine; just follow it through.  Let $D_n(a,b)$ be the determinant of the matrix with diagonal elements $a$ and all other elements $b$; clearly $D_1(a,b)=a$.  For $n>1$, multiplying the first row by $-b/a$ and adding it to every other row gives $0$'s in the first column (except for an $a$ in the upper left), $a - b^2/a$ along the rest of the diagonal, and $b - b^2/a$ everywhere else.  Using the Laplace expansion on the first column gives
$$
D_n(a,b)=a D_{n-1}\left(a-\frac{b^2}{a}, b-\frac{b^2}{a}\right)=aD_{n-1}\left(\frac{(a-b)(a+b)}{a},\frac{b(a-b)}{a}\right).
$$
Now, rescaling all $n-1$ remaining rows by $a/(a-b)$ gives
$$
D_n(a,b)=\frac{(a-b)^{n-1}}{a^{n-2}}D_{n-1}(a+b,b).
$$
Expanding this out, then,
$$
D_n(a,b)=\frac{(a-b)^{n-1}}{a^{n-2}}\cdot\frac{a^{n-2}}{(a+b)^{n-3}}\cdot\frac{(a+b)^{n-3}}{(a+2b)^{n-4}}\cdots \frac{(a + (n-3)b)}{1}D_1(a+(n-1)b, n) \\
= (a-b)^{n-1}\left(a + (n-1)b\right),
$$
since the product telescopes and all terms cancel except the first numerator.  The solution to the original problem is
$$
D_n(-1,2)=(-1-2)^{n-1}\left(-1 + (n-1)2\right)=(-3)^{n-1}(2n-3).
$$
