Amazon interview question

Design a data structure that handles circular dependancy