Artificial intelligent assistant

Metric spaces and compactness Let $X$ be a metric space and $Y$ a subset of $X$. Suppose that from every sequence in $Y$ it is possible to extract a subsequence that converges to some point of $X$. I want to show that the closure of $Y$ is compact. Let $(x_k)$ be a sequence in $\overline{Y}$. I want to show that it admits a convergent subsequence (obviously if this is the case, the limit will be automatically a poin in $\overline{Y})$. Any suggestion? Thank-you.

Let $x_k$ be a sequence of $\bar Y$, consider $y_k\in Y$ with $d(x_k,y_k)<{1\over 2^k}$, you can extract a subsequence $y_{n_k}$ from $y_k$, that converges towards $y$. $d(y,x_{n_k})\leq d(y,y_{n_k})+d(y_{n_k},x_{n_k})$. This implies that $x_{n_k}$ converges towards $y$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 49139e163de241e69b74012fac2322bd