It is which is in the first post of this page. :) It is the same site I mentioned before (which is implemented in C). You may keep your iterative implementation but need to adjust the height inside your loop. However, you won't gain much from iterative because this type of problem would not require many run in the loop. Why? Because the number of recursion should not be more than the current tree height (which is log2 -- binary search tree).

PS: I tried it again, the order of setting node height could replace the recursive height adjustment. I am wrong about the site code is incorrect. :(