About 191,000 results
Open links in new tab
  1. Transform to Sum Tree | Practice | GeeksforGeeks

    Given a Binary Tree of size N , where each node can have positive or negative values. Convert this to a tree where each node contains the sum of the left and right sub trees of the original tree.

  2. Convert binary tree into sum tree (with Visualization)

    Oct 3, 2025 · Learn step-by-step how to convert a binary tree to a sum tree with optimized O (n) solution. Includes Python, Java, and C++ code examples and visual explanations.

  3. Transform to Sum Tree | GFG | Full Explanation, Approach, Dry ...

    In this video, I explain the Transform to Sum Tree problem from GeeksforGeeks (GFG) in the simplest and clearest way. You will learn what a Sum Tree is, how to solve it using Post-Order...

  4. Convert a Binary Tree into a Sum Tree - DSA Visualization

    Learn how to convert a binary tree into a sum tree where each node's value is replaced by the sum of the values in its left and right subtrees. Explore code examples in multiple …

  5. 1038. Binary Search Tree to Greater Sum Tree - LeetCode

    Binary Search Tree to Greater Sum Tree - Given the root of a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus …

  6. Transform to Sum Tree - LinkedIn

    Nov 6, 2024 · Update the node’s value to the sum of the left and right subtrees. Return the sum of the original node’s value plus the subtree sum (for parent nodes' calculations).

  7. In-place convert a binary tree to its sum tree - Techie Delight

    Sep 15, 2025 · Given a binary tree, in-place convert it into its sum tree. Each node's value is equal to the sum of all elements present in its left and right subtree in a sum tree.