1. What is a mutex, semaphore
2. What is virtual memory, paging. Why is it required to swap pages, etc..
3. What is virtual destructor (explain with some code).
4. The code was pasted in collabedit. Its an easy problem to solve, but only if you understand the problem in 5 minutes. I had about 20 minutes in total. (You might see the interviewer has mixed Java and C++. There is no public/private access specifier. Integer class is only in Java, coding standards are according to Java specifications, but I guess you get the point of the question, so that's not a problem).
/**
* Given a nested list of integers, returns the sum of all integers in the list weighted by their depth
* For example, given the list {{1,1},2,{1,1}} the function should return 10 (four 1's at depth 2, one 2 at depth 1)
* Given the list {1,{4,{6}}} the function should return 27 (one 1 at depth 1, one 4 at depth 2, and one 6 at depth 3)
*/
int depthSum (NestedInteger *input, int count)
{}
/**
* This is the interface that represents nested lists.
* You should not implement it, or speculate about its implementation.
*/
class NestedInteger
{
/** @return true if this NestedInteger holds a single integer, rather than a nested list */
boolean isInteger();
/** @return the single integer that this NestedInteger holds, if it holds a single integer
* Return null if this NestedInteger holds a nested list */
Integer getInteger();
/** @return the nested list that this NestedInteger holds, if it holds a nested list
* Return null if this NestedInteger holds a single integer */
NestedInteger *getList();
int getCount();
}