Find the maximum likelihood estimator of the unknown parameter $\theta$ if $X_1, X_2,..., X_n $ is a sample from a distribution whose density function is $$ f_x(x) = (1/2)e^{-{|x-\theta|}}, -\infty < x < \infty $$ Hint: It might be easier to consider separately the cases where n is odd and n is even.
So far, I used the log-likelihood function to get to: $$ L(X_1...X_n;\theta) = n\ln(1/2)-\sum_{j=1}^n |x_j- \theta| $$ Now, I need to take the derivative with respect to $\theta$, but the summation of the absolute value is throwing me off and I don't know how to approach this. I feel like I can handle the problem once I get through this part, so any help in terms of approaching this would be greatly appreciated.
Thanks!