Consider the function over [0,1] given by $f(x)= \begin{cases}
0 & x \in \mathbb{Q}\\
x & x \notin \mathbb{Q}
\end{cases}$

In order to compute the Lebesgue integral of $f$ we need to find an increasing sequence of simple functions which are all less than or equal to and converge to $f$. 

I was thinking if the function $f\_{n}(x)= \frac{1}{n}\lfloor nx \rfloor$ , $x \notin \mathbb{Q}$, would work. 

Thanks in advance!