ABC interview question

about data structure