Algorithms

[LeetCode 105] Construct Binary Tree from Preorder and Inorder Traversal

Given preorder and inorder traversal of a tree, construct the binary tree. Note:You ...
Algorithms

[LeetCode 1305] All Elements in Two Binary Search Trees

Given two binary search trees root1 and root2. Return a list containing all the integers from both trees sorted in ascending order. ...
Algorithms

[LeetCode 236] Lowest Common Ancestor of a Binary Tree

Given a binary tree, find the lowest common ancestor (LCA) of two given ...
Algorithms

[LeetCode 501] Find Mode in Binary Search Tree

Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently ...
Algorithms

[LeetCode 223] Rectangle Area

https://leetcode.com/problems/rectangle-area/ Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is ...
Algorithms

[LeetCode 1161] Maximum Level Sum of a Binary Tree

Given the root of a binary tree, the level of its root is 1, the level of ...
Algorithms

[LeetCode 1302] Deepest Leaves Sum

Given a binary tree, return the sum of values of its deepest leaves. ...
Algorithms

[LeetCode 1379] Find a Corresponding Node of a Binary Tree in a Clone of That Tree

Given two binary trees original and cloned and given a reference to a node target in the original tree. ...
Algorithms

[LeetCode 1466] Reorder Routes to Make All Paths Lead to the City Zero

testestsetsetsetestset
Algorithms

[LeetCode 1372] Longest ZigZag Path in a Binary Tree

https://leetcode.com/problems/longest-zigzag-path-in-a-binary-tree/ Given a binary tree root, a ZigZag path for a binary tree is defined ...