Consider the function defined by
$$ f(x)=\begin{cases}0, & x=0\\1, & \textrm{ if }\lfloor\frac{1}{x}\rfloor\textrm{ is even}\\-1, & \textrm{ if }\lfloor\frac{1}{x}\rfloor\textrm{ is odd}\end{cases} $$
(Here $\lfloor x\rfloor=\max\{k\in\mathbb{Z}: k\leq x\}$ is the floor function.)
Prove or disprove that $f$ is Riemann-integrable on $[0,2]$.
My first observation is that $$ \left\lfloor\frac{1}{x}\right\rfloor=\begin{cases}0, & x>1\\1, & x=1\end{cases}~\implies f(x)=\begin{cases}1, & x\in(1,2]\\-1, & x=1\end{cases} $$
so on $[1,2]$ $f$ has finitely many points of discontinuity and thus Riemann-integrable.
It remains to consider $f$ on $[0,1)$.
There are at least countably many points of discontinuity in $[0,1)$, namely, for example,
$x=\frac{1}{k}, k\geq 2$
since $$f\left(\frac{1}{k}\right)=\begin{cases}1, & k\geq 2\textrm{ and }k\textrm{ even}\\-1, & k\geq 2\textrm{ and }k\textrm{ odd }\end{cases}$$
But my feeling is that there are even uncountably many points of discontinuity in $[0,1)$ which probably has something to do with the fact that there are uncountably many irrational numbers in $[0,1)$.
$f$ is a constant on each interval of the type $(\frac 1 n, \frac 1 {n+1})$ and hence it is continuous on each of these. The only points of dis-continuity are the end points of these intervals which are countable in number. Hence, $f$ is Riemann integrable.