StackAdapt interview question

One design question and several standard algorithm/data structure questions.