MTX Group interview question

Coding questions about trees and strings