Suppose that $X$ is a Hausdorff space and $\alpha : [0, 1] \to X$ is a continuous function. If $\alpha$ is one-one, then prove that the image of $\alpha$ is homeomorphicto $[0, 1]$. Give an example where $\alpha$ is not one-one but the image of $\alpha$ is homeomorphic to $[0, 1]$.$ $
I am able to show the first part but not the second part. Any help would be highly appreciated!
Any non-injective surjective function between $[0,1]$ and $[0,1]$ should do the trick.