code for a height balanced tree in C