Arista Networks Interview Question

for example: How to find next greatest element in a BST in O(log n) given the pointer to the given node?