Consider i.i.d random variables $X_1,X_2,\ldots,X_n$ having the $U[0,\theta]$ distribution: $$f_{\theta}(x)=\frac{\mathbf1_{[0,\theta]}(x)}{\theta}$$
, where the unknown parameter $\theta\in\{1,2,\ldots\}$.
What can I say about the maximum likelihood estimator (MLE) of $\theta$?
Usually the parameter space is $\mathbb R^{+}$ in which case the MLE is known to be $$X_{(n)}=\max\{X_1,X_2,\ldots,X_n\}$$
, but here the parameter space is restricted to the natural numbers.
In any case, the likelihood function given the sample $x_1,\ldots,x_n$ is
$$L(\theta)=\frac{\mathbf1_{[0,\theta]}(x_1,\ldots,x_n)}{\theta^n}=\frac{\mathbf1_{[x_{(n)},\infty)}(\theta)}{\theta^n}\qquad,\,\theta\in\mathbb N$$
So I should check the values of $L(\theta)$ for each $\theta\in\{1,2,\ldots\}$ and the MLE is that value of $\theta$ for which $L(\theta)$ is maximized. Is this the correct strategy or can I say that MLE of $\theta$ is $\hat\theta=\lfloor X_{(n)}\rfloor$? Or does the MLE exist at all? I am not sure.
Any hint would be helpful.