Consider the following algorithm for testing if a given binary tree has the binary search tree property.
where RIGHTMOST-DESC(v) is v if v.right = null and RIGHTMOST-DESC(v.right) otherwise. Your task is to either prove the correctness of this algorithm or provide a counter example where it fails to return the correct answer.