Thursday, January 17, 2008

Return Finally

public int foo(int x)
{
int i;
try
{
i=5;
return i;
}
finally
{
i=x;
}
}


What does foo() return?

Sunday, December 02, 2007

Static Thread Safe

are static members thread safe? is there any exception to this rule?

Monday, July 30, 2007

Binary Tree Traversals

long time no post... Likely not an interview question, but it's a good exercise.

write a pre-order, in-order and post-order traversal of a binary tree.

Friday, November 10, 2006

(de)serialize a binary tree

write a method that will serialize and deserialize a binary tree

Tuesday, October 31, 2006

Memory Leak in Java

How can you create a memory leak in Java?

Thursday, May 04, 2006

Random What?

for those who know perl:
srand;
rand($.) < line =" $_)">;
print $line;
explain what this does. explain why rand will give this task a uniform distribution.

Friday, March 17, 2006

Explain OO

Explain Object Oriented Programming to a non-technical person. Try and explain the basics as well as the more advanced topics. Include discussion on polymorphism, inheritence, design patterns, etc.

Most importantly explain the pros and cons of this programming model.

Measuring Search Quality

How would you measure the quality of a search engine?

Google PM Question