I need to find maximum likelihood estimation of parameter $\theta$ from sample $X_{1},...,X_{n}$ of distribution set by formula $p(x)=\frac{1}{2}e^{|x-\theta|}$.
My approach is basic: $L(\theta) = \prod_{i=1}^{n} p(x)$ and corresponding $LL(\theta) = ln(\prod_{i=1}^{n} p(x))=... =\frac{1}{2}\sum_{i=1}^{n}(|x_i-\theta|)$. Then my idea is to reorder $X_{1},...,X_{n}$ such all $X_{1},...,X_{k} < \theta$ and $X_{k+1},...,X_{n} \geq \theta$. It helps to get rid of abslolute values, however after taking derivative of $LL(\theta)$, I get something odd.
Assuming that you meant $p(x)=\frac12\mathrm e^{-|x-\theta|}$, as suggested in a comment:
The derivative of the log-likelihood is piecewise constant, since shifting $\theta$ shifts the exponent at a constant rate as long as you don't cross any of the $x_i$. The maximum is reached at the median, or, for even $n$, in the interval between the two medians, because each data point on one side contributes the same to the rate at which the exponent shifts with $\theta$, with the sign depending on which side of $\theta$ the data point is on.