Autobrains interview question

Build a tree and return its height