filmov
tv
Leetcode 617 | Merge Two Binary Trees | Recursion (Java Solution Explained in details)

Показать описание
Merge Two Binary Trees is a typical tree problem, where you need to use recursion to traverse the tree.
Solution provided here is for leetcode problem 617. Merge Two Binary Trees
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.
You need to merge them into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of the merged node. Otherwise, the NOT null node will be used as the node of new tree.
#mergetwobinarytree #thetechgranth #leetcode
About Channel:
This channel is for all those Aspirant who wants to get into big Tech Company.
It will help you prepare for your interviews and learn core concepts.
I have started with problem solving of leetcode in parallel with tutorials on core data structures. I will add content on system design and microservices as well
Do subscribe to the the channel to get all updates.
Post comment if my videos has helped you
Solution provided here is for leetcode problem 617. Merge Two Binary Trees
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.
You need to merge them into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of the merged node. Otherwise, the NOT null node will be used as the node of new tree.
#mergetwobinarytree #thetechgranth #leetcode
About Channel:
This channel is for all those Aspirant who wants to get into big Tech Company.
It will help you prepare for your interviews and learn core concepts.
I have started with problem solving of leetcode in parallel with tutorials on core data structures. I will add content on system design and microservices as well
Do subscribe to the the channel to get all updates.
Post comment if my videos has helped you