How is bottom down approach better?

why is time complexity better here?we are still finding height and calling diameter for left and right sub trees!

in first method we are calculating heights which take O(n)
and then we call on left and right side for diameter
but in bottom up solution we don’t call for height rather left sub tree return its dia as well as height