EPAM Systems interview question

tree set