How to solve this limit related to series? How to solve the following limit?
$$\lim_{N\rightarrow+\infty}\frac{1}{N}\sum_{k=1}^{N-1}\left(\frac{k}{N}\right)^N$$

Fix some large $M$ and suppose $N>M.$ Split the series into the first $N-M-1$ and the last $M$ terms like this: $$ \frac{1}{N} \sum_{k=1}^{N-1} \left( \frac{k}{N} \right)^N =\frac{1}{N} \sum_{k=1}^{N-M-1} \left( \frac{k}{N} \right)^N +\frac{1}{N} \sum_{k=N-M}^{N-1} \left( \frac{k}{N} \right)^N .$$
The summand of the first sum is maximized for $k=N-M-1$ so 
$$\frac{1}{N} \sum_{k=1}^{N-M-1} \left( \frac{k}{N} \right)^N< \frac{N-M-1}{N} \left( \frac{N-M-1}{N} \right)^N< \left( \frac{N-M-1}{N} \right)^N \to \exp(-M-1)$$
as $N\to \infty.$ 
The summand of the second sum is maximized for $k=N-1$ so $$\frac{1}{N} \sum_{k=N-M}^{N-1} \left( \frac{k}{N} \right)^N< \frac{M}{N} \left(\frac{N-1}{N} \right)^N < \frac{M}{N} \to 0$$
as $N\to\infty.$ 
Thus for sufficiently large $N$, we have $$ \frac{1}{N} \sum_{k=1}^{N-1} \left( \frac{k}{N} \right)^N < \exp(-M-1).$$
For any $\epsilon>0$ we could have chosen $M$ large enough so that $\exp(-M-1) < \epsilon,$ so the limit is $0.$
