Microsoft interview question

Implement basic data structure