Let $f:\mathcal{R}^n\rightarrow \mathcal{R}$ be continuous. Let $K\subset \mathcal{R}^n$ be nonempty and compact. Suppose $f$ is defined as $f=f_1(x)$ $\forall x\in K$ and $f=f_2(x)$ $\forall x\notin K$. Suppose $f_1$ and $f_2$ are locally Lipschitz functions. Is $f$ locally Lipschitz? If so, where can I start in proving that? Any help will be greatly appreciated.
Remark: I can see it is differentiable almost everywhere but that is not enough to imply local Lipschitzness. How do I show it is locally Lipschitz on the boundary of $K$? Those are the key points, right?