Let $f(x) = x +1$ for $x \geq 0$ and $f(x) = x- 1$ for $x < 0$. I want to use the limits to show that $\lim_{x \rightarrow 0} f(x)$ does not exist. I tried with using $x_n = \frac{1}{n} \rightarrow 0$ (as $n \rightarrow \infty$) which leads to $f(x) \rightarrow \pm 1$ (as $x \rightarrow 0$). Is this enough to show the desired conclusion ?
Edit : The following excerpt is from Wade's Analysis book. I wonder how the expression form for $f(x_n)$ was followed, whether it's a typo or not.

Your thought is close to being correct. Per your $x_n = \dfrac{1}{n}$, it is not correct because that is only one sequence and $f(x_n) \to 1$. Perhaps you mean $x_n = \pm \dfrac{1}{n}$, but this means you essentially have $2$ sequences $x_n = \dfrac{1}{n}, x'_n = -\dfrac{1}{n}$ and in this case it is true. In general, you simply need to choose $2$ distinct sequences that converge to $0$ and the sequences obtained by applying $f$ to both sequences converge to $2$ different values, i.e diverge. You could argue, by using the sequence $x_n = \dfrac{(-1)^n}{n}$ which converges to $0$. However, the sequence $\{f(x_n)\}$ does not converge to any value. The reason for that is it has $2$ subsequences $f(x_{2n})$ converges to $1$, and $f(x_{2n+1})$ converges to $-1$. This all means that there is no limit at $x = 0$ of $f$.