I'd be OK with using BFS or DFS, but with this caveat:
If it's a whiteboard thing, then don't expect a detailed, working implementation in code. Ask for a sketch / high level overview / pseudo-code that shows the candidate understand it well enough that you can infer that they could implement it with a compiler / google / book / etc.
OR
If you want an implementation, give them a machine, let them use their language of choice, use google, etc., and let them actually code it up, making and fixing errors as they go, etc. I actually like this because it lets you see how someone approaches debugging, etc.
In either case, you could supplement the exercise with some discussion questions "why /when would you use BFS?" etc.