Arista Networks Interview Question

Given a node in a BST, find the next greater element.