Get cmnAncester with O(h) and O(n) time

if it's balanced, then logn space timecomplexity