check if a binary tree is a binary search tree
abr = abrLeft &amp;&amp; abrRigh &amp;&amp; (x.key &gt; maxLeft) &amp;&amp; (x.key &lt; minLeft); should likely be comparing with maxLeft and minRight, not maxLeft and minLeft



if(x == NULL)
    return &lt;true, -∞, +∞&gt;;


I'm guessing the point of returning infinities here is to make a NULL vertex NEVER fail the &gt; and &lt; comparisons above, in which case in makes more sense to return &lt;true, +∞, -∞&gt;;