What are some examples of functions which are continuous, but whose inverse is not continuous?

nb: I changed the question after a few comments, so some of the below no longer make sense. Sorry.

Define $f: [0,1) \cup [2,3] \rightarrow [0,2]$ by  

$$f(x)=\begin{cases} x & x \in [0,1) \\ x-1 & x \in [2,3] \end{cases}$$
