Pergunta de entrevista da empresa Meta

tree question of finding right most node