@JohnsonJiang said in Given a Binary Search Tree, Find the distance between 2 nodes:

then distance = root->node1 + root->node2 - 2 * root->LCA;

Why don't you just calculate the distance from LCA to node1 and node2, which means distance = LCA->node1 + LCA->node2?