mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[LintCode] Problem 614 - Binary Tree Longest Consecutive Sequence II

Posted on 2019-05-20 | In Algorithm , LintCode
Given a binary tree, find the length(number of nodes) of the longest consecutive sequence(Monotonic and adjacent node values differ by 1) path.The pat ...
Read more »

[LintCode] Problem 595 - Binary Tree Longest Consecutive Sequence

Posted on 2019-05-20 | In Algorithm , LintCode
Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any ...
Read more »

[LintCode] Problem 878 - Boundary of Binary Tree

Posted on 2019-05-20 | In Algorithm , LintCode
Given a binary tree, return the values of its boundary in anti-clockwise direction starting from root. Boundary includes left boundary, leaves, and ri ...
Read more »

[LintCode] Problem 864 - Equal Tree Partition

Posted on 2019-05-19 | In Algorithm , LintCode
Given a binary tree with n nodes, your task is to check if it’s possible to partition the tree to two trees which have the equal sum of values after r ...
Read more »

[LeetCode] Problem 114 - Flatten Binary Tree to Linked List

Posted on 2019-05-17 | In Algorithm , LeetCode
Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: 12345 1 / \ 2 5 / \ \3 4 6 The flatte ...
Read more »

[LeetCode] Problem 897 - Increasing Order Search Tree

Posted on 2019-05-17 | In Algorithm , LeetCode
Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and o ...
Read more »

[LeetCode] Problem 222 - Count Complete Tree Nodes

Posted on 2019-05-17 | In Algorithm , LeetCode
Given a complete binary tree, count the number of nodes. NoteDefinition of a complete binary tree from Wikipedia:In a complete binary tree every level ...
Read more »

[LeetCode] Problem 993 - Cousins in Binary Tree

Posted on 2019-05-16 | In Algorithm , LeetCode
In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1. Two nodes of a binary tree are cousins if they have ...
Read more »

[LeetCode] Problem 507 - Perfect Number

Posted on 2019-05-16 | In Algorithm , LeetCode
We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write ...
Read more »

[LeetCode] Problem 367 - Valid Perfect Square

Posted on 2019-05-16 | In Algorithm , LeetCode
Given a positive integer num, write a function which returns True if num is a perfect square else False. NoteDo not use any built-in library function ...
Read more »
1…394041…78
mrlonelyjtr

mrlonelyjtr

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

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