Let $A \subset \mathbb{R}$ such that $\forall x \in \mathbb{R}$ and $r>0$ holds $|A \cap [x,x+r]| \leq rf(r)$ where $\lim_{r \rightarrow 0} f(r) = 0$. Show that $|A| = 0$.
I tried to prove the statement when $A$ is bounded, but i failed. Therefore any help is apperciated, but rather a hint than a solution. I guess the general case follows from the bounded case.