I'm sure you'll be okay, but don't worry too much. If you couldn't solve the question in front of the interviewer under pressure and with their expectation that you'll be able to immediately code out the solution without thinking for a minute, then that doesn't mean you're not a good programmer.