My better alternative is to just skip the code test part. You can still have the candidate chat with other engineers which is usually enough to be able to probe and figure if someone knows what they're talking about.
I can learn much more about the technical ability of a candidate by speaking to them about their projects and how they work than by checking whether they know how to implement a binary tree