Find a continuous function over reals that takes on every value exactly three times.
I was thinking such a function would have to have two critical points and must go from increasing to decreasing or decreasing to increasing. Something like $x^3$, but still there are some points there that aren't counted three times. How would I go about constructing such a function?
