DSAWiser

DSA question set · 200 questions

Binary Tree DSA Practice Questions

Explore 200 DSA questions in Binary Tree. Practice with DSAWiser’s code editor and visualizer.

Binary treeCreate a Single Tree NodeValue of Root NodeCheck if Tree is EmptyCheck if Root is a LeafGet Left Child ValueGet Right Child ValueCount Children of RootCheck if Root Has Both ChildrenCheck if Root Has Exactly One ChildSum of Root and Immediate ChildrenCompare Root with Left ChildCompare Root with Right ChildDifference Between Children ValuesSwap Immediate Children of RootCheck if Tree Has Exactly One NodeCheck if Root is an Internal NodeMaximum of Root and Direct ChildrenMinimum of Root and Direct ChildrenCheck if Root Has Left Child OnlyCheck if Root Has Right Child OnlyGet Values of GrandchildrenCount Nodes up to Depth 1Height of a Small Tree (Depth at most 1)Check if Children Have Equal ValuesCheck if Root Value is Average of ChildrenPreorder Traversal of a Tree of Depth at most 1Inorder Traversal of a Tree of Depth at most 1Postorder Traversal of a Tree of Depth at most 1Check if Root is Greater than Both ChildrenCheck if Root is Smaller than Both ChildrenCheck Local BST Property at RootSum of Left Spine up to Depth 2Sum of Right Spine up to Depth 2Check if Left Child is a LeafCheck Parity of Root Node ValueCheck if Right Child is a LeafCount Direct Children That Are LeavesCheck if Root Equals Sum of ChildrenProduct of Root and Direct ChildrenReset Root Value to ZeroPrune Left Subtree at RootPrune Right Subtree at RootCreate a Two-Node Tree (Left Child)Create a Two-Node Tree (Right Child)Compare Left and Right Child ValuesCreate a Three-Node TreeCheck if Any Direct Child Has Negative ValueAbsolute Difference with Left ChildAbsolute Difference with Right ChildCheck if Tree Has No Left ChildMaximum depth DFS/BFSPreorder traversalInorder traversalPostorder traversalNode-count aggregationSubtree sum aggregationRecursive mirror mutationStructural equalityMirror symmetryNearest leaf / BFSLeaf countingValue maximum aggregationValue minimum aggregationBSTOrdered searchUniform-value predicateRoot-to-leaf sum existencePairwise recursive mergeLeaf-sequence comparisonPruned range sumOriented-leaf aggregationEnumerate root-to-leaf pathsExpression-tree evaluationDepth/parent cousin comparisonLevel average BFSSpecial full/min-child treeOrdered LCADistinct-node two-sumInorder adjacent differenceInorder frequency modesStructural subtree searchCanonical parenthesis encodingClone-correspondence identityBinary root-to-leaf numeral aggregationFull-tree shape predicateDegenerate-tree shape predicateFiltered node countingPreorder target search with depthUniform leaf-depth predicateFlat BFS orderSingle-child countingExact root-to-leaf node countSibling lookupParent lookupGeneral-tree-value range countParent-child order predicateGrouped level-order traversalRight view BFSPath-maximum node predicateDeepest-level aggregationComplete-layout BFS predicateBottom-left BFS valuePer-level maximaMaximum level sum with earliest tiePostorder height/balance invariantPostorder diameter invariantPostorder subtree sums and tiltBalanced construction from sorted keysInorder structural rewriteGeneral-tree LCA via binary childrenAlternating level traversalGlobal key bounds validationPreorder/inorder reconstructionInorder/postorder reconstructionPreorder flattening in placeCross-level next pointersEnumerate target-sum pathsDownward-prefix path countingInorder order statisticComplete-tree count below linear timeIndependent-set tree DPBST deletion and successor/predecessorBST leaf insertion / alternative shapeOrder-preserving range trimmingParent-aware distance BFSComplete-slot width indicesCanonical subtree interningPostorder coin balanceLCA of deepest leavesPath min/max ancestor differenceRoot-leaf parity masksLazy inorder stack iteratorBST combinatoricsCatalan-number DPSwapped-key recoveryDecimal path numeral sumPostorder sum frequencyDepth-row structural insertionRecursive leaf deletion to fixed pointSubtree sum/count averageInfection / eccentricity from one nodeAlternating-edge path DPPostorder existence pruningFlip-invariant structural equivalenceImplicit binary treeArithmetic path in implicit labelsBounded leaf-distance histogramsLCA plus directional pathsOutput-sensitive tree layoutEnumerate Catalan familyInorder rebuilding / balanced search treeAuxiliary binary treeMaximum Cartesian constructionLevel parity/order verificationBoundary walk with leaf deduplicationImplicit-label LCA cycle distanceGeneral treeLongest label-compatible path DPLeaf-restricted maximum path DPVoyage matching / minimum flipsBurning / eccentricity from one nodeMorris traversal / restoration labBinary tree with random pointersIdentity-preserving graph copySubtree-size centroid selectionAny-endpoint maximum path DPSerialization/deserialization APIThree-state camera greedy / DPCoordinate ordering with value tiesPreorder depth parser reconstructionAll-node distance rerootingBST subtree summary DPBST insertion-order combinatoricsOutside-subtree height queriesGuessed-edge orientation rerootingLeaf grafting with global BST boundsValue-threshold union-find pathsConnected-subset diameter enumerationTwo-edge cuts / component XORWeighted path rerootingTrip path frequencies + independent-set DPPrime/nonprime path component countingDiameter/center merge optimizationBinary-lifting ancestor data structureAncestor XOR trie with rollbackBST subtree size summary DPPersistent frequencies + LCA kth pathOffline distinct-color path queriesDSU-on-tree frequency thresholdsHeavy-light path/subtree lazy updatesCentroid exact-length pair countsAncestor-dependent DFS-order knapsackUnrooted canonical tree isomorphismNode-XOR path countingOutside-subtree diameter rerootingRadius domination greedy / DPInsertion-only diameter endpoints / LCAImplicit treap split/merge/reversalCut-budget component selectionVirtual-tree minimum separating cutLink-cut dynamic forestDynamic max-plus independent-set DPCartesian tree + optimal static RMQCentroid distance convolutionDynamic path order statisticsBounded-diameter connected-subset counting

What’s in this set

The Binary Tree collection contains 200 problems: 50 basic, 53 easy, 56 medium, 34 hard, 7 very hard. Choose a question at your current level, or follow the collection’s order below.

Topics in this collection include Binary tree, Create a Single Tree Node, Value of Root Node, Check if Tree is Empty, Check if Root is a Leaf. Each question shows its own topics and difficulty so you can decide where to begin.

Practice with the code visualizer

  1. Open a question in the editor and read the statement, inputs, and expected output. Predict the result for a small example before writing code.
  2. Write a solution and run the examples. If a result differs from your prediction, reduce the input until you can follow each step.
  3. Step through your code in the visualizer. Use a breakpoint to inspect the state at a specific line, then compare it with your reasoning.

Questions in this set

200 total

Open a question in the editor to read its statement and examples. Sign in to practice.

  1. Create a Single Tree NodeBinary tree · Create a Single Tree NodeBasic
  2. Value of Root NodeBinary tree · Value of Root NodeBasic
  3. Check if Tree is EmptyBinary tree · Check if Tree is EmptyBasic
  4. Check if Root is a LeafBinary tree · Check if Root is a LeafBasic
  5. Get Left Child ValueBinary tree · Get Left Child ValueBasic
  6. Get Right Child ValueBinary tree · Get Right Child ValueBasic
  7. Count Children of RootBinary tree · Count Children of RootBasic
  8. Check if Root Has Both ChildrenBinary tree · Check if Root Has Both ChildrenBasic
  9. Check if Root Has Exactly One ChildBinary tree · Check if Root Has Exactly One ChildBasic
  10. Sum of Root and Immediate ChildrenBinary tree · Sum of Root and Immediate ChildrenBasic
  11. Compare Root with Left ChildBinary tree · Compare Root with Left ChildBasic
  12. Compare Root with Right ChildBinary tree · Compare Root with Right ChildBasic
  13. Difference Between Children ValuesBinary tree · Difference Between Children ValuesBasic
  14. Swap Immediate Children of RootBinary tree · Swap Immediate Children of RootBasic
  15. Check if Tree Has Exactly One NodeBinary tree · Check if Tree Has Exactly One NodeBasic
  16. Check if Root is an Internal NodeBinary tree · Check if Root is an Internal NodeBasic
  17. Maximum of Root and Direct ChildrenBinary tree · Maximum of Root and Direct ChildrenBasic
  18. Minimum of Root and Direct ChildrenBinary tree · Minimum of Root and Direct ChildrenBasic
  19. Check if Root Has Left Child OnlyBinary tree · Check if Root Has Left Child OnlyBasic
  20. Check if Root Has Right Child OnlyBinary tree · Check if Root Has Right Child OnlyBasic
  21. Get Values of GrandchildrenBinary tree · Get Values of GrandchildrenBasic
  22. Count Nodes up to Depth 1Binary tree · Count Nodes up to Depth 1Basic
  23. Height of a Small Tree (Depth at most 1)Binary tree · Height of a Small Tree (Depth at most 1)Basic
  24. Check if Children Have Equal ValuesBinary tree · Check if Children Have Equal ValuesBasic
  25. Check if Root Value is Average of ChildrenBinary tree · Check if Root Value is Average of ChildrenBasic
  26. Preorder Traversal of a Tree of Depth at most 1Binary tree · Preorder Traversal of a Tree of Depth at most 1Basic
  27. Inorder Traversal of a Tree of Depth at most 1Binary tree · Inorder Traversal of a Tree of Depth at most 1Basic
  28. Postorder Traversal of a Tree of Depth at most 1Binary tree · Postorder Traversal of a Tree of Depth at most 1Basic
  29. Check if Root is Greater than Both ChildrenBinary tree · Check if Root is Greater than Both ChildrenBasic
  30. Check if Root is Smaller than Both ChildrenBinary tree · Check if Root is Smaller than Both ChildrenBasic
  31. Check Local BST Property at RootBinary tree · Check Local BST Property at RootBasic
  32. Sum of Left Spine up to Depth 2Binary tree · Sum of Left Spine up to Depth 2Basic
  33. Sum of Right Spine up to Depth 2Binary tree · Sum of Right Spine up to Depth 2Basic
  34. Check if Left Child is a LeafBinary tree · Check if Left Child is a LeafBasic
  35. Check Parity of Root Node ValueBinary tree · Check Parity of Root Node ValueBasic
  36. Check if Right Child is a LeafBinary tree · Check if Right Child is a LeafBasic
  37. Count Direct Children That Are LeavesBinary tree · Count Direct Children That Are LeavesBasic
  38. Check if Root Equals Sum of ChildrenBinary tree · Check if Root Equals Sum of ChildrenBasic
  39. Product of Root and Direct ChildrenBinary tree · Product of Root and Direct ChildrenBasic
  40. Reset Root Value to ZeroBinary tree · Reset Root Value to ZeroBasic
  41. Prune Left Subtree at RootBinary tree · Prune Left Subtree at RootBasic
  42. Prune Right Subtree at RootBinary tree · Prune Right Subtree at RootBasic
  43. Create a Two-Node Tree (Left Child)Binary tree · Create a Two-Node Tree (Left Child)Basic
  44. Create a Two-Node Tree (Right Child)Binary tree · Create a Two-Node Tree (Right Child)Basic
  45. Compare Left and Right Child ValuesBinary tree · Compare Left and Right Child ValuesBasic
  46. Create a Three-Node TreeBinary tree · Create a Three-Node TreeBasic
  47. Check if Any Direct Child Has Negative ValueBinary tree · Check if Any Direct Child Has Negative ValueBasic
  48. Absolute Difference with Left ChildBinary tree · Absolute Difference with Left ChildBasic
  49. Absolute Difference with Right ChildBinary tree · Absolute Difference with Right ChildBasic
  50. Check if Tree Has No Left ChildBinary tree · Check if Tree Has No Left ChildBasic
  51. Maximum Depth of Binary TreeBinary tree · Maximum depth DFS/BFSEasy
  52. Binary Tree Preorder TraversalBinary tree · Preorder traversalEasy
  53. Binary Tree Inorder TraversalBinary tree · Inorder traversalEasy
  54. Binary Tree Postorder TraversalBinary tree · Postorder traversalEasy
  55. Count Total NodesBinary tree · Node-count aggregationEasy
  56. Sum of All Node ValuesBinary tree · Subtree sum aggregationEasy
  57. Invert Binary TreeBinary tree · Recursive mirror mutationEasy
  58. Same TreeBinary tree · Structural equalityEasy
  59. Symmetric TreeBinary tree · Mirror symmetryEasy
  60. Minimum Depth of Binary TreeBinary tree · Nearest leaf / BFSEasy
  61. Count Leaf NodesBinary tree · Leaf countingEasy
  62. Find Maximum Value in Binary TreeBinary tree · Value maximum aggregationEasy
  63. Find Minimum Value in Binary TreeBinary tree · Value minimum aggregationEasy
  64. Search in a Binary Search TreeBST · Ordered searchEasy
  65. Univalued Binary TreeBinary tree · Uniform-value predicateEasy
  66. Path SumBinary tree · Root-to-leaf sum existenceEasy
  67. Merge Two Binary TreesBinary tree · Pairwise recursive mergeEasy
  68. Leaf-Similar TreesBinary tree · Leaf-sequence comparisonEasy
  69. Range Sum of BSTBST · Pruned range sumEasy
  70. Sum of Left LeavesBinary tree · Oriented-leaf aggregationEasy
  71. Binary Tree PathsBinary tree · Enumerate root-to-leaf pathsEasy
  72. Evaluate Boolean Binary TreeBinary tree · Expression-tree evaluationEasy
  73. Cousins in Binary TreeBinary tree · Depth/parent cousin comparisonEasy
  74. Average of Binary Tree Levels as Fixed DecimalsBinary tree · Level average BFSEasy
  75. Second Minimum Node In a Binary TreeBinary tree · Special full/min-child treeEasy
  76. Lowest Common Ancestor of a Binary Search TreeBST · Ordered LCAEasy
  77. Two Sum IV - Input is a BSTBST · Distinct-node two-sumEasy
  78. Minimum Absolute Difference in BSTBST · Inorder adjacent differenceEasy
  79. Find Mode in Binary Search TreeBST · Inorder frequency modesEasy
  80. Subtree of Another TreeBinary tree · Structural subtree searchEasy
  81. Construct String from Binary TreeBinary tree · Canonical parenthesis encodingEasy
  82. Find Corresponding Node Index in a Cloned TreeBinary tree · Clone-correspondence identityEasy
  83. Sum of Root To Leaf Binary NumbersBinary tree · Binary root-to-leaf numeral aggregationEasy
  84. Check if Binary Tree is FullBinary tree · Full-tree shape predicateEasy
  85. Check if Binary Tree is SkewedBinary tree · Degenerate-tree shape predicateEasy
  86. Count Nodes with Even ValuesBinary tree · Filtered node countingEasy
  87. Find Depth of Target NodeBinary tree · Preorder target search with depthEasy
  88. Check if All Leaves are at Same LevelBinary tree · Uniform leaf-depth predicateEasy
  89. Level Order Traversal (Flat Array)Binary tree · Flat BFS orderEasy
  90. Count Single-Child NodesBinary tree · Single-child countingEasy
  91. Root-to-Leaf Path of Given LengthBinary tree · Exact root-to-leaf node countEasy
  92. Find Sibling of a NodeBinary tree · Sibling lookupEasy
  93. Find Parent of a NodeBinary tree · Parent lookupEasy
  94. Count Nodes within Range in Binary TreeBinary tree · General-tree-value range countEasy
  95. Check if All Paths are Strictly IncreasingBinary tree · Parent-child order predicateEasy
  96. Binary Tree Level Order TraversalBinary tree · Grouped level-order traversalEasy
  97. Binary Tree Right Side ViewBinary tree · Right view BFSEasy
  98. Count Good Nodes in Binary TreeBinary tree · Path-maximum node predicateEasy
  99. Deepest Leaves SumBinary tree · Deepest-level aggregationEasy
  100. Check Completeness of a Binary TreeBinary tree · Complete-layout BFS predicateEasy
  101. Find Bottom Left Tree ValueBinary tree · Bottom-left BFS valueEasy
  102. Find Largest Value in Each Tree RowBinary tree · Per-level maximaEasy
  103. Maximum Level Sum of a Binary TreeBinary tree · Maximum level sum with earliest tieEasy
  104. Balanced Binary TreeBinary tree · Postorder height/balance invariantMedium
  105. Diameter of Binary TreeBinary tree · Postorder diameter invariantMedium
  106. Binary Tree TiltBinary tree · Postorder subtree sums and tiltMedium
  107. Convert Sorted Array to Binary Search TreeBST · Balanced construction from sorted keysMedium
  108. Increasing Order Search TreeBST · Inorder structural rewriteMedium
  109. Lowest Common Ancestor of a Binary TreeBinary tree · General-tree LCA via binary childrenMedium
  110. Binary Tree Zigzag Level Order TraversalBinary tree · Alternating level traversalMedium
  111. Validate Binary Search TreeBST · Global key bounds validationMedium
  112. Construct Binary Tree from Preorder and Inorder TraversalBinary tree · Preorder/inorder reconstructionMedium
  113. Construct Binary Tree from Inorder and Postorder TraversalBinary tree · Inorder/postorder reconstructionMedium
  114. Flatten Binary Tree to Linked ListBinary tree · Preorder flattening in placeMedium
  115. Next-Right Links by Binary Tree Node IndexBinary tree · Cross-level next pointersMedium
  116. Path Sum IIBinary tree · Enumerate target-sum pathsMedium
  117. Path Sum IIIBinary tree · Downward-prefix path countingMedium
  118. Kth Smallest Element in a BSTBST · Inorder order statisticMedium
  119. Count Complete Tree NodesBinary tree · Complete-tree count below linear timeMedium
  120. House Robber IIIBinary tree · Independent-set tree DPMedium
  121. Delete Node in a BSTBST · BST deletion and successor/predecessorMedium
  122. Insert into a Binary Search TreeBST · BST leaf insertion / alternative shapeMedium
  123. Trim a Binary Search TreeBST · Order-preserving range trimmingMedium
  124. All Nodes Distance K in Binary TreeBinary tree · Parent-aware distance BFSMedium
  125. Maximum Width of Binary TreeBinary tree · Complete-slot width indicesMedium
  126. Find Duplicate SubtreesBinary tree · Canonical subtree interningMedium
  127. Distribute Coins in Binary TreeBinary tree · Postorder coin balanceMedium
  128. Smallest Subtree with all the Deepest NodesBinary tree · LCA of deepest leavesMedium
  129. Maximum Difference Between Node and AncestorBinary tree · Path min/max ancestor differenceMedium
  130. Pseudo-Palindromic Paths in a Binary TreeBinary tree · Root-leaf parity masksMedium
  131. Binary Search Tree IteratorBST · Lazy inorder stack iteratorMedium
  132. Unique Binary Search TreesBST combinatorics · Catalan-number DPMedium
  133. Recover Binary Search TreeBST · Swapped-key recoveryMedium
  134. Sum Root to Leaf NumbersBinary tree · Decimal path numeral sumMedium
  135. Most Frequent Subtree SumBinary tree · Postorder sum frequencyMedium
  136. Add One Row to TreeBinary tree · Depth-row structural insertionMedium
  137. Delete Leaves With a Given ValueBinary tree · Recursive leaf deletion to fixed pointMedium
  138. Count Nodes Equal to Average of SubtreeBinary tree · Subtree sum/count averageMedium
  139. Amount of Time for Binary Tree to Be InfectedBinary tree · Infection / eccentricity from one nodeMedium
  140. Longest ZigZag Path in a Binary TreeBinary tree · Alternating-edge path DPMedium
  141. Binary Tree PruningBinary tree · Postorder existence pruningMedium
  142. Flip Equivalent Binary TreesBinary tree · Flip-invariant structural equivalenceMedium
  143. Path In Zigzag Labelled Binary TreeImplicit binary tree · Arithmetic path in implicit labelsMedium
  144. Number of Good Leaf Nodes PairsBinary tree · Bounded leaf-distance histogramsMedium
  145. Step-By-Step Directions From a Binary Tree Node to AnotherBinary tree · LCA plus directional pathsMedium
  146. Print Binary TreeBinary tree · Output-sensitive tree layoutMedium
  147. Unique Binary Search Trees IIBST combinatorics · Enumerate Catalan familyMedium
  148. Balance a Binary Search TreeBST · Inorder rebuilding / balanced search treeMedium
  149. Maximum Binary TreeAuxiliary binary tree · Maximum Cartesian constructionMedium
  150. Even Odd TreeBinary tree · Level parity/order verificationMedium
  151. Boundary Traversal of Binary TreeBinary tree · Boundary walk with leaf deduplicationMedium
  152. Cycle Length Queries in a TreeImplicit binary tree · Implicit-label LCA cycle distanceMedium
  153. Longest Path With Different Adjacent CharactersGeneral tree · Longest label-compatible path DPMedium
  154. Maximum Path Sum Between Two LeavesBinary tree · Leaf-restricted maximum path DPMedium
  155. Flip Binary Tree To Match Preorder TraversalBinary tree · Voyage matching / minimum flipsMedium
  156. Burning Tree from Target NodeBinary tree · Burning / eccentricity from one nodeMedium
  157. Morris Inorder TraversalBinary tree · Morris traversal / restoration labMedium
  158. Reindex a Binary Tree with Random LinksBinary tree with random pointers · Identity-preserving graph copyMedium
  159. Tree Centroid FindingGeneral tree · Subtree-size centroid selectionMedium
  160. Binary Tree Maximum Path SumBinary tree · Any-endpoint maximum path DPHard
  161. Serialize and Deserialize Binary TreeBinary tree · Serialization/deserialization APIHard
  162. Binary Tree CamerasBinary tree · Three-state camera greedy / DPHard
  163. Vertical Order Traversal of a Binary TreeBinary tree · Coordinate ordering with value tiesHard
  164. Recover a Tree From Preorder TraversalBinary tree · Preorder depth parser reconstructionHard
  165. Sum of Distances in TreeGeneral tree · All-node distance rerootingHard
  166. Maximum Sum BST in Binary TreeBST · BST subtree summary DPHard
  167. Number of Ways to Reorder Array to Get Same BSTBST combinatorics · BST insertion-order combinatoricsHard
  168. Height of Binary Tree After Subtree Removal QueriesBinary tree · Outside-subtree height queriesHard
  169. Count Number of Possible Root NodesGeneral tree · Guessed-edge orientation rerootingHard
  170. Merge BSTs to Create Single BSTBST · Leaf grafting with global BST boundsHard
  171. Number of Good PathsGeneral tree · Value-threshold union-find pathsHard
  172. Count Subtrees With Max Distance Between CitiesGeneral tree · Connected-subset diameter enumerationHard
  173. Minimum Score After Removals on a TreeGeneral tree · Two-edge cuts / component XORHard
  174. Difference Between Maximum and Minimum Price SumGeneral tree · Weighted path rerootingHard
  175. Minimize the Total Price of the TripsGeneral tree · Trip path frequencies + independent-set DPHard
  176. Count Valid Paths in a TreeGeneral tree · Prime/nonprime path component countingHard
  177. Minimum Diameter After Merging Two TreesGeneral tree · Diameter/center merge optimizationHard
  178. Kth Ancestor of a Tree NodeGeneral tree · Binary-lifting ancestor data structureHard
  179. Maximum Genetic Difference QueryGeneral tree · Ancestor XOR trie with rollbackHard
  180. Largest BST SubtreeBST · BST subtree size summary DPHard
  181. K-th Smallest on Tree PathGeneral tree · Persistent frequencies + LCA kth pathHard
  182. Distinct Elements on Tree PathGeneral tree · Offline distinct-color path queriesHard
  183. Subtree Frequency Queries with DSU on TreeGeneral tree · DSU-on-tree frequency thresholdsHard
  184. Heavy-Light Decomposition with Path and Subtree UpdatesGeneral tree · Heavy-light path/subtree lazy updatesHard
  185. Centroid Decomposition: Count Paths of Length KGeneral tree · Centroid exact-length pair countsHard
  186. Optimal Tree Knapsack with Subtree Dependency in O(N * W)General tree · Ancestor-dependent DFS-order knapsackHard
  187. Tree Isomorphism for Unrooted TreesGeneral tree · Unrooted canonical tree isomorphismHard
  188. Count Paths with Given XOR Sum in a TreeGeneral tree · Node-XOR path countingHard
  189. Tree Diameter after Subtree Severance in O(1) per QueryGeneral tree · Outside-subtree diameter rerootingHard
  190. Generalized R-Dominating Set on TreesGeneral tree · Radius domination greedy / DPHard
  191. Dynamic Tree Center and Radius with Node InsertionsGeneral tree · Insertion-only diameter endpoints / LCAHard
  192. Implicit Treap with Lazy Range ReversalsAuxiliary binary tree · Implicit treap split/merge/reversalHard
  193. Maximum Selected Component Sum after at Most K CutsGeneral tree · Cut-budget component selectionHard
  194. Virtual Tree: Disconnect Query VerticesGeneral tree · Virtual-tree minimum separating cutVery hard
  195. Link-Cut Tree: Dynamic Forest Path MaximumGeneral tree · Link-cut dynamic forestVery hard
  196. Dynamic Tree DP: Maximum Independent Set with Point UpdatesGeneral tree · Dynamic max-plus independent-set DPVery hard
  197. Cartesian Tree Construction and Range Minimum QueriesAuxiliary binary tree · Cartesian tree + optimal static RMQVery hard
  198. All-Pairs Distance Frequencies via Centroid Decomposition and FFTGeneral tree · Centroid distance convolutionVery hard
  199. Dynamic Tree Path K-th Element with Point UpdatesGeneral tree · Dynamic path order statisticsVery hard
  200. Count Induced Subtrees with Bounded DiameterGeneral tree · Bounded-diameter connected-subset countingVery hard