mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[Leetcode] Problem 677 - Map Sum Pairs

Posted on 2020-10-11 | In Algorithm , LeetCode
Implement a MapSum class with insert, and sum methods. For the method insert, you’ll be given a pair of (string, integer). The string represents the k ...
Read more »

[Leetcode] Problem 652 - Find Duplicate Subtrees

Posted on 2020-10-11 | In Algorithm , LeetCode
Given the root of a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of any one ...
Read more »

[Leetcode] Problem 1483 - Kth Ancestor of a Tree Node

Posted on 2020-10-10 | In Algorithm , LeetCode
You are given a tree with n nodes numbered from 0 to n-1 in the form of a parent array where parent[i] is the parent of node i. The root of the tree i ...
Read more »

[Leetcode] Problem 1373 - Maximum Sum BST in Binary Tree

Posted on 2020-10-10 | In Algorithm , LeetCode
Given a binary tree root, the task is to return the maximum sum of all keys of any sub-tree which is also a Binary Search Tree (BST). Assume a BST is ...
Read more »

[Leetcode] Problem 1530 - Number of Good Leaf Nodes Pairs

Posted on 2020-10-10 | In Algorithm , LeetCode
Given the root of a binary tree and an integer distance. A pair of two different leaf nodes of a binary tree is said to be good if the length of the s ...
Read more »

[Leetcode] Problem 1457 - Pseudo-Palindromic Paths in a Binary Tree

Posted on 2020-10-10 | In Algorithm , LeetCode
Given a binary tree where node values are digits from 1 to 9. A path in the binary tree is said to be pseudo-palindromic if at least one permutation o ...
Read more »

[Leetcode] Problem 1443 - Minimum Time to Collect All Apples in a Tree

Posted on 2020-10-08 | In Algorithm , LeetCode
Given an undirected tree consisting of n vertices numbered from 0 to n-1, which has some apples in their vertices. You spend 1 second to walk over one ...
Read more »

[Leetcode] Problem 1382 - Balance a Binary Search Tree

Posted on 2020-10-08 | In Algorithm , LeetCode
Given a binary search tree, return a balanced binary search tree with the same node values. A binary search tree is balanced if and only if the depth ...
Read more »

[Leetcode] Problem 1339 - Maximum Product of Splitted Binary Tree

Posted on 2020-10-08 | In Algorithm , LeetCode
Given a binary tree root. Split the binary tree into two subtrees by removing 1 edge such that the product of the sums of the subtrees are maximized. ...
Read more »

[Leetcode] Problem 1305 - All Elements in Two Binary Search Trees

Posted on 2020-10-08 | In Algorithm , LeetCode
Given two binary search trees root1 and root2. Return a list containing all the integers from both trees sorted in ascending order. ExampleNo.1 Input: ...
Read more »
1…345…78
mrlonelyjtr

mrlonelyjtr

间歇性踌躇满志,持续性混吃等死

780 posts
18 categories
18 tags
Github
© 2020 mrlonelyjtr
Powered by Hexo
Theme - NexT.Pisces