It is common that the interviewer(s) will test the candidate's knowledge of the subject and how s/he tackles difficult and/or unfamiliar questions. Most of the time, there is no single right answer and the crux is to test the candidate's logical thinking and analytical power. Many candidates came out thinking that they had performed badly but finally got the offer!