I was given a small programming test on a website and after passing that, I was scheduled for an interview. The job posting listed multiple kinds of software engineering positions and I wasn't given a choice among them before the interview. Thus, I got an interviewer who was not from my preferred position and the first question was outside my experience. It was a major stumble for me that I didn't manage to recover from.
The second question was much easier for me but I was still stumbling from the last one. It was also more difficult because I had to do it in a text editor lacking many of the features I'm used to and with no way to test my code so I just had to look at it and say "Yeah, this will work."