I am trying to encode an AVL binary tree in the C language. My implementation uses an over-arching struct to keep track of the length of the binary tree (i.e. number of nodes), as well as a pointer t the root, and the init status of the data structure. I have been able to encode an implementation correctly balances the tree at every insertion. However, I am having problems balancing the tree when I delete a node. I am trying to use an example listed on GeeksforGeeks (
Immediately, you can tell that the heights don't sense.