Amazon interview question

Diameter of binary tree pseudo code