ShowingNo, you should not look at the code sample. It doesn't really help you in the interview decision. Did he write it? How long did it take? How much help from because you cannot be sure of the internet did he get?following:
- Did he write it?
- How long did it take?
- How much help from the internet did he get?
None of these questions can be definitively answered in an interview.
Now, present white board and give a technical challenge to solve in code. That way you can see how he thinks about code, does he know the language? Or rely on intelisense? You can add constraints and see how flexibly he thinks.
All of these help you decide how much support this person would need to do the role you are trying to fill.