Frage im Vorstellungsgespräch bei Google

Write an algorithm that checks if a binary tree is balanced, improve it and determine its complexity.