Seven Bridges interview question

Some questions were about data structures