I think this partly depends on how hard the coding question is. If they give you FizzBuzz, I think you're pretty much required to ace it, even if you've never seen it. FizzBuzz is really simple though.
At Facebook I was getting I guess what you'd call classic algorithm questions but with an extra twist thrown in. If you combine that twist with excessive time restrictions (the Facebook interviews were strictly 45 minutes), you not only have to code well, you have to do it fast. On an algorithm that they appear to be hoping you've never seen before.