OJ
Ctrlk
  • Introduction
  • Some Tips
  • strStr and Coding Style
  • Binary Search
  • Binary Tree & Divide Conquer
    • Binary Search Tree
    • Divide & Concquer
      • 226. Invert Binary Tree
      • Insufficient Nodes in Root to Leaf Paths
      • Convert Sorted Array to Binary Search Tree
      • Maximum Depth of Binary Tree
      • 1430. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
      • Balanced Binary Tree
      • Binary Tree Tilt
      • 617. Merge Two Binary Trees
      • 100. Same Tree
      • 543. Diameter of Binary Tree
      • 865. Smallest Subtree with all the Deepest Nodes
      • Second Minimum Node In a Binary Tree
      • Path Sum
      • 236. Lowest Common Ancestor of a Binary Tree
      • 111. Minimum Depth of Binary Tree
      • Maximum Binary Tree
      • Most Frequent Subtree Sum
      • 114. Flatten Binary Tree to Linked List
      • 834. Sum of Distances in Tree
      • 1443. Minimum Time to Collect All Apples in a Tree
      • Construct Binary Tree from Preorder and Inorder Traversal
      • Construct Binary Tree from Inorder and Postorder Traversal
      • Count Complete Tree Nodes
      • Populating Next Right Pointers in Each Node
      • Binary Tree Longest Consecutive Sequence
      • Sum of Left Leaves
      • 87. Scramble String
      • LCA of the Deepest Nodes
      • 统计Distance和覆盖
        • Sum of Distances in Tree
    • Path-recorder Depth-first Search
    • Order Traversal
    • 919. Complete Binary Tree Inserter
    • 1519. Number of Nodes in the Sub-Tree With the Same Label
    • 307. Range Sum Query - Mutable
    • 428. Serialize and Deserialize N-ary Tree
    • 315. Count of Smaller Numbers After Self
  • Dynamic Programming I
  • Dynamic Programming II
  • Linked List
  • Array & Numbers
  • Heap
  • Hash
  • Multiple Pointers
  • Stack
  • Breadth-first Search
  • Bit Manipulation
  • Math
  • Trie
  • Graph
  • Union Find
  • Exhaustive Search
  • String
  • Greedy
  • Design
  • Queue
Powered by GitBook
On this page
  1. Binary Tree & Divide Conquer
  2. Divide & Concquer

统计Distance和覆盖

Sum of Distances in Tree
PreviousLCA of the Deepest NodesNextSum of Distances in Tree

Last updated 6 years ago

Was this helpful?

Was this helpful?