Microsoft interview question

Problem-solving, Trees, hashmaps, two pointers.