Binary Tree in Java - 28: Get Sum of elements Level wise of Binary Tree

preview_player
Показать описание

Solution:
- We'll take a queue with adding root element,
- We'll take a size variable & sum variable
- For each level, we'll get size & do until size is greater than 0 & keep adding sum

Time Complexity: O(n)
Space Complexity: O(n)

Do Watch video for more info

This Problem is synonym of following problems:

How to Get level wise Sum of Binary Tree,
Binary tree get sum of elements level wise of Binary Tree,
Binary tree get sum of elements level wise of Binary Tree java,
get sum of elements level wise,
level order sum binary tree,
Binary tree,
java,

Please check video for more info:

CHECK OUT CODING SIMPLIFIED

★☆★ VIEW THE BLOG POST: ★☆★

I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 200+ videos.

★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★

★☆★ Send us mail at: ★☆★

Рекомендации по теме
Комментарии
Автор

Good explanation of question but you lack in the area of coding try to write code during explanation of video you previously write that code and on explanation and that is not clear so try to write code during video I think that will be good.

thebasics
Автор

please make videos on hash table how to useit

ujjwaljain
Автор

Sir Binary Tree and Linked List playlist have more than 80 videos but Stack and Queues playlist have only 3 videos ????

teetanrobotics
Автор

TIME AND SPCE COMPLEXITY FOR THE ABOVE PROBLEM??

ishikagupta