Arista Networks interview question

Implement "next" for binary trees.