Nokia interview question

efficient way of implementing data structures