You can represent the effect of the oracle as

$$U_f \ket{x} = (-1)^{1-x} \ket{x} = (-1) \cdot (-1)^x \ket{x}$$

This effect can be achieved as a combination of two oracles you've seen earlier, for functions $f(x) = 1$ and $f(x) = x$, applied consecutively.

@[solution]({
    "id": "deutsch_algo__one_minus_x_oracle_solution",
    "codePath": "./Solution.qs"
})
