Yandex Interview Question

Tree traversal,zigzag iterator, merging intervals, perfect square