Draw the graph and study the discontinuity points of the function
$$ h(x)= \begin{cases} x[\frac{1}{x}] & \text{if } x \neq 0, \\ 1 & \text{if } x=0. \\ \end{cases} $$
Where $[\frac{1}{x}]$ is the floor of $\frac{1}{x}$.
My attempt:
- The limit doesn’t exist at $x=1$
$\lim_{x \to 1^+} h(x)=0$ and $\lim_{x \to 1^-} h(x)=1 $
Thus, $h$ is not continuous at $x=1$
- $\lim_{x\to 0^+} h(x)=\ lim_{x\to 0^-} h(x)=h(0)=1 $
Hence, $h$ is continuous at $x=0$.
The function is continuous on $\Bbb{R}\setminus \{1\}$. Is that true?
Edit:
I noted that
If $\frac{1}{2}<x\le 1$ then $x[\frac{1}{x}]=x$
If $\frac{1}{3}<x\le \frac{1}{2}$ then $x[\frac{1}{x}]=2x$
If $\frac{1}{4} < x \le \frac{1}{3}$ then $x[\frac{1}{x}]=3x$
.
.
- If $\frac{1}{n+1} < x \le \frac{1}{n}$, then $x[\frac{1}{x}]=nx$
And we have that
$\lim_{x \to \frac{1}{2}^-} f(x)=1$ and $\lim_{x \to \frac{1}{2}^+} f(x)=\frac{1}{2}$
Then the limit does not exit at $x=\frac{1}{2}$
$\lim_{x \to \frac{1}{3}^-} f(x)=1$ and $\lim_{x \to \frac{1}{3}^+} f(x)=\frac{2}{3}$
Then the limit does not exit at $x=\frac{1}{3}$.
In general, $\lim_{x \to \frac{1}{n}^-}=1\neq \lim_{x \to \frac{1}{n}^+}=\frac{n-1}{n}$
Then, $f$ is not continuous at $x=\frac{1}{n}$ for all $n\in \Bbb{N}$.

I doubt that between $-1$ and $1$ the function looks as you claim it does. E.g. for irrational $x \in (0,1)$, $h(x)$ will be irrational.
Of course the points where discontinuities can occur are exactly the ones where $\lfloor 1/x\rfloor$ is discontinuous. Which are they? And which of them really give discontinuities? (I think most of them do.)
Finally, I think that your one-sided limits at $x=0$ are correct, but you don't give arguments for them. As a hint, one can e.g. use $1/x-1 \le \lfloor 1/x\rfloor \le 1/x$.