Accelya Group interview question

Medium level algorithmic and data structure problems.