Why go through all this complication? Use bugs that have actually occurred in your app, repurpose those into coding problems, and see how the prospect solves it. You might be surprised that they fix the bug better than your existing employees (or you).
Well you don't give them the entire codebase, you package the bug-that-was-fixed into a tiny example app. I think it probably goes without saying to exclude changes in business rules.
Is this not closer to the actual job than Pascal's Triangle?