Domanda di colloquio di Microsoft

Question asked: Given a binary tree, with root and child node pointers given, devise a formula to calculate the pointer to every node's closest right node on the same level, if one exists