$f$ is continuous at $x_0 \Leftrightarrow$ for every monotonic sequence $x_n$ in $\text{dom}(f)$ converging to $x_0$, we have $\lim f(x_n) = f(x_0)$ $f$ is continuous at $x_0 \Leftrightarrow$ for every monotonic sequence $x_n$ in $\text{dom}(f)$ converging to $x_0$, we have $\lim f(x_n) = f(x_0)$
Note: There is one answer for this already but it uses a different method than my attempted proof below, so please do not mark this as a duplicate.
Proof:
Take arbitrary $x_n$ converging to $x$. Then every sequence contains a monotonic sub-sequence, so take $x_{n_k}$ to be a monotonic sub-sequence of $x_n$. Since $x_n$ converges to x, then so does $x_{n_k}$.  Then by assumption $f(x_{n_k})$ converges to $f(x)$. This is where I am stuck and am not sure how to complete the idea now that $f(x_n)$ converges to $f(x)$.

Hint
For every subsequence $(x_{n_k})_{k \in \mathbb N}$ of $(x_n)_{n \in \mathbb N}$ there exists a subsequence $(x_{n_{k_\ell}})_{\ell \in \mathbb N}$ of $(x_{n_k})_{k \in \mathbb N}$ with $f(x_{n_{k_\ell}}) \rightarrow f(x_0)$ (this can be proven similar to your idea, so that comes into play here)
It follows that $f(x_n) \rightarrow f(x_0)$. Can you see why?
PS: I hope this is not the prove mentioned in the other question.
