For a fixed Cantor set $K\subset [0,1]$ and a continuous function $g:[0,1]\to \mathbb R.$ Is it always possible to find a $C^{\infty}$ map $f:[0,1]\to \mathbb R$ such that $g$ and $f$ coincide in $K?$


The case $g=0$ (the constant function $0$) is covered in [Non-zero smooth functions vanishing on a Cantor set](https://mathoverflow.net/questions/179445/non-zero-smooth-functions-vanishing-on-a-cantor-set).


Suppose for example that $K$ is the middle third Cantor set.



On Cantor sets every map is $C^{\infty}$
Let's see. $1/3 \in K$ is a limit point from the left of points in $K$. So try
$$
g(x) = \left|x - \frac{1}{3}\right|^{1/2}
$$
No function $f$ that agrees with $g$ on $K$ can have a finite derivative at $1/3$.


