Artificial intelligent assistant

Discontinuous bijection example Is there an example of a function that is discontinuous but bijective whose inverse is also a bijection and discontinuous?

$$f(x) = \begin{cases} x & \text{if }x\in \mathbb Q \\\ x+1 & \text{if }x\in \mathbb R\setminus\mathbb Q \end{cases} $$

Or even $$ g(x) = \begin{cases} -x & \text{if }x\in\mathbb Q \\\ 2\sqrt2-x & \text{if }x-\sqrt2 \in \mathbb Q \\\ x & \text{otherwise} \end{cases} $$ which is _its own inverse_ and nowhere continuous.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f8be045d268c64fde556068c41d0b783