NVIDIA Interview Question

code a binary tree leetcode problem in CPP