PSTech interview question

Algorithms complexity in trees.