Dense subset on complete metric space Let $(X,d)$ be a metric space and $M$ a dense subset of $X$ with the proterty that every Cauchy sequence of $M$ has a limit inside $X$. Show that $X$ is complete.
With contradiction:
Let $(x_{n})$ be a Cauchy sequence of $X$ such that it doesn't converge on $X$.
We can take a subsequence  $x_{k_{n}}\subseteq M$ and we know that $x_{k_{n}}\rightarrow x,\, x\in X$
and therefore we have that  $x_{n}\rightarrow x$ because $(x_{n})$ is Cauchy and if one subsequence converges to $x$ we know that $(x_{n})$ is also converges to $x$ and that's a contradiction.
Is my proof complete, thank you.
Here's one approach: let $(x_n)_{n\geq 1}$ be a Cauchy sequence in $X$. For each $n\geq 1$, pick $x_n'\in M\cap B(x_n, 1/n)$.

Show that $(x_n')_{n\geq 1}$ is a Cauchy sequence too.

By assumption, there is $x\in X$ with $x_n'\to x$.

Show that $x_n \to x$ as well.
Correct me if i am wrong cause i am not sure about my anwser but i couldn't come up with anything else.
Let $x_{n}\epsilon X$ and $x'_{n}\epsilon M\bigcap B(x_{n},\frac{1}{n})$
$\Rightarrow $ $d(x'_{n},x_{n})&lt;\frac{1}{n}$ $\Rightarrow $ $d(x'_{n},x_{n})\rightarrow 0$ (1)
i take $m\geq n\geq n_{0}$ and i have $d(x'_{m},x'_{n})\leq d(x'_{m},x_{n})+d(x_{n},x'_{n})$ $\overset{(1)}{\rightarrow}0$
and that says $x'_{n}$ is Cauchy $\Rightarrow $ $x'_{n}\rightarrow x\epsilon X$
now
$d(x_{n},x)\leq d(x_{n},x'_{n})+d(x'_{n},x)\rightarrow 0$
and that proves that $X$ is complete