ret.min = min(l.min, min(r.min, root->data));
ret.max = max(r.max, max(l.max, root->data));
why we write like this because as if know it is BST it is obvious that min = left.min and max = right.max ?
source - https://www.geeksforgeeks.org/largest-bst-binary-tree-set-2/