Yeah most job interviews will have some form of that. Just practice (by doing more interviews), and you will get better at it.

What I don't like is when they expect you to write picture-perfect code on the white board rather than general pseudo-code. Most of my interviewers were okay with me writing pseudocode, but I had one or two interviewers in the past who were extremely picky and wanted to see every single semicolon in its place on that white board. That was annoying, and I would never expect that if I were an interviewer.