diagonal sum in Binary Tree Problem Solution -
Let's Jump To my Solution now-
Fucntion Descreption ->
I have written a function that returns the sum of diagonal if I pass the current root, map(for storing diagonal sum till now ), and diagonal number to this function parameter. This is a magical function, isn't it 😆😆 XD.
Think like that -
I don't know the solution but if somehow i get diagonal sum excluded root node my task will be minimized and i will add only root node to previous sum.