Unless your business is selling solutions to algorithmic riddles, your coding test probably shouldn't be testing for them. Try to make it a reasonable proxy for what the engineer will be doing day-to-day, and make sure it's a novel problem statement to which the candidate hasn't already been exposed.