Function on $[0,1]$ which takes every value twice has infinitely many discontinuities.

132 Views Asked by At

I know that there is no continuous function on $[0,1]$ which takes each value exactly twice.
I know how to prove this fact using Intermediate value property and attainment of maximum value on compact set.
I am interested to show that for such function number of discontinuties are infinitely many?
I had no clue how to proceed for this example.
Any help will be appreciated.