1. Data Structure questions Suggested questions: Linked list / double linked list operations : insert/remove/reverse etc. Binary tree operations: insert / delete Stacks and Queues operations: push/pop, enqueue, dequeue 2. Object Oriented Programming Suggested questions: - Must understand the concept of polymorphism (without rely on using example) (eg. use of virtual functions) - Can program in template (eg. write a stack template) - Know basic STL container (vector, stack, queue, map) Note: Please get the syntax right! Interviewer can tell how much the candidate has been doing programming simply by looking at the syntax of the code from the candidate. Most people are sloppy on this, thinking that compiler can catch it. Yes, compiler can catch the syntax errors, so does the interviewer! The only conclusion (could be a wrong one) that interviewer can draw if he/she sees a lot of syntax errors is that the candidate is either careless, or didn’t write too much code, either way, that really hurts the candidate. Few Things to look out: Matching {}, right level of dereferencing pointer, ‘==’ instead of ‘=’, missing “A::” when writing function outside the class scope A::f() {…}, missing “;” etc., etc. 3. Simple algorithm problems Suggested questions: - Breadth First Search, Depth First Search - Calculating Fibonancci number - Calculating Prime number 4. Progressive questions Suggested questions: Nowadays, many interviewers like to pose a technical problem to the candidate to solve on the spot. The interviewer asks the candidate to think out loud and describe his or her thought processes in real time while solving the problem. Example: Design an algorithm to reverse the order of the words in a sentence. MARY HAD A LITTLE LAMB should become LAMB LITTLE A HAD MARY. Despite the pressure, most candidates can come up with an algorithm. But the problem can be deceptive, and the most promising candidates are asked a follow-up question: OK, but can you come up with a more elegant algorithm that may be shorter and faster?
|