mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[LeetCode] Problem 572 - Subtree of Another Tree

Posted on 2019-05-10 | In Algorithm , LeetCode
Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a ...
Read more »

[LeetCode] Problem 226 - Invert Binary Tree

Posted on 2019-05-08 | In Algorithm , LeetCode
Invert a binary tree. ExampleInput: 12345 4 / \ 2 7 / \ / \1 3 6 9 Output: 12345 4 / \ 7 2 / \ / \9 6 3 1 Code ...
Read more »

[LeetCode] Problem 814 - Binary Tree Pruning

Posted on 2019-05-08 | In Algorithm , LeetCode
We are given the head node root of a binary tree, where additionally every node’s value is either a 0 or a 1. Return the same tree where every subtree ...
Read more »

[LeetCode] Problem 199 - Binary Tree Right Side View

Posted on 2019-05-08 | In Algorithm , LeetCode
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example ...
Read more »

[LeetCode] Problem 590 - N-ary Tree Postorder Traversal

Posted on 2019-05-08 | In Algorithm , LeetCode
Given an n-ary tree, return the postorder traversal of its nodes’ values. For example, given a 3-ary tree: Return its postorder traversal as: [5,6,3, ...
Read more »

[LeetCode] Problem 589 - N-ary Tree Preorder Traversal

Posted on 2019-05-08 | In Algorithm , LeetCode
Given an n-ary tree, return the preorder traversal of its nodes’ values. For example, given a 3-ary tree: Return its preorder traversal as: [1,3,5,6, ...
Read more »

[LeetCode] Problem 429 - N-ary Tree Level Order Traversal

Posted on 2019-05-08 | In Algorithm , LeetCode
Given an n-ary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level). For example, given a 3-ary tree: ...
Read more »

[LeetCode] Problem 662 - Maximum Width of Binary Tree

Posted on 2019-05-07 | In Algorithm , LeetCode
Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The binar ...
Read more »

[LeetCode] Problem 146 - LRU Cache

Posted on 2019-05-07 | In Algorithm , LeetCode
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get(key) - Get the ...
Read more »

[LeetCode] Problem 655 - Print Binary Tree

Posted on 2019-05-04 | In Algorithm , LeetCode
Print a binary tree in an m*n 2D string array following these rules: The row number m should be equal to the height of the given binary tree. The col ...
Read more »
1…414243…78
mrlonelyjtr

mrlonelyjtr

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

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