Amazon Interview Question

M-array Burning Tree traversal problem GFG hard marked burning Binary Tree, pretty similar to that