NVIDIA interview question

code a binary tree leetcode problem in CPP