Perhaps a more revealing test would be to provide a problem with a
partially working/designed solution, asking the candidate to
complete/ehance/correct the solution.
This approach may then give the candidate the ability and freedom
to be a little more creative than they might otherwise be, while also
allowing the employer to assess their skills across a range of areas,
ie design, coding style and general problem solving ability.