It's pretty common for software developers to be asked to code up some random algorithm on a whiteboard as part of the interview process.