LeedCode 617: merge binary trees

Path sum Title Description: Given two binary trees, imagine that when you overlay one of them on the other, some nodes of the two binary trees will overlap. You need to merge them into a new binary tree. The merging rule is that if two nodes overlap, their values are added as the new value after node merging. Otherwise, the node that is not ...

Posted by fsumba on Sat, 22 Jan 2022 11:41:53 +0100