For $f : [0;1] \to \mathbb{R}$, let $M_f := \{x \in [0;1] \mid f(x)$ is a local strict maximum of $f\}$. It is easy to see that for any $f$, $M_f$ is at most countable. It is also easy to see that there can be a continuous $f$ such that $M_f$ is infinite. The first question you can ask is the following: is there a continuous $f$ such that $M_f$ is dense in $[0;1]$? To answer this, one can build an ad hoc function; the construction is a bit nasty, I leave the details to those that want to see for themselves, but a nicer solution seems to be the following: show that a continuous function that is nowhere differentiable (e.g., the Weierstrass function) has a dense $M_f$. We can think of this generalization; any solution will most likely be nowhere differentiable.

My question is the following:

Is it true that if $f$ is continuous and nowhere differentiable, then $M_f$ is dense in $[0;1]$?

What I've tried so far: it is a known result that if a continuous function is monotonous on some interval $I$, then it is differentiable almost everywhere on $I$, so the idea would be to show that a function such that $M_f$ isn't dense has to be monotonous on some interval. So assume $M_f$ is not dense, then find an interval $I$ such that $M_f \cap I =\emptyset$, and then try to work on this interval, knowing that local maxima on this interval have to be non-strict, i.e., for any interval $J\subset I$, if $x\in J$ and $f(x)$ is a maximum of $f$ on $J$ then there is some $y\in J$ such that $f(y)=f(x)$. This approach has been unsuccessful so far, but I think there might be something to do with the theory of bounded variations; I haven't tried this yet. Any ideas, counterexamples?