Fractal interview question

Online coding test