We know that the height of a binary tree is the total number of nodes along the longest path from the root to a leaf node. The idea is to traverse the tree after ordering and calculate the heights of the left and right subtrees. The height of the subtree rooted at any node is one greater than the maximum height of the subtrees to its left and right. Applies this property to all tree nodes recursively from bottom to top (post order method) and returns the maximum height of the subtree rooted at this node. In a normal binary tree, the left and right children of leaf nodes are null pointers. But here the left and right children of the leaf node behave like previous and next pointers in a circularly doubly linked list. For a node to be a leaf node, ensure that its left, right and left sides point to itself.