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][2].

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


  [2]: https://mathoverflow.net/questions/179445/non-zero-smooth-functions-vanishing-on-a-cantor-set