Algorithms

[LeetCode 1130] Minimum Cost Tree From Leaf Values

Given an array arr of positive integers, consider all binary trees such that: Each node ...
Algorithms

[LeetCode 1339] Maximum Product of a Splitted Binary Tree

Given a binary tree root. Split the binary tree into two subtrees by removing 1 edge ...
Algorithms

[LeetCode 1145] Binary Tree Coloring Game

Two players play a turn based game on a binary tree.  We are ...
Algorithms

[LeetCode 971] Flip Binary Tree to Match Preorder Traversal

https://leetcode.com/problems/flip-binary-tree-to-match-preorder-traversal/ You are given the root of a binary tree with n nodes, where each node is ...
Algorithms

[LeetCode 968] Binary Tree Cameras

https://leetcode.com/problems/binary-tree-cameras/ Given a binary tree, we install cameras on the nodes of the ...
Algorithms

[LeetCode 1609] Even Odd Tree

A binary tree is named Even-Odd if it meets the following conditions: The root of ...
Algorithms

[LeetCode 1600] Throne Inheritance

A kingdom consists of a king, his children, his grandchildren, and so on. ...