mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[LeetCode] Problem 543 - Diameter of Binary Tree

Posted on 2019-05-30 | In Algorithm , LeetCode
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe ...
Read more »

[LeetCode] Problem 979 - Distribute Coins in Binary Tree

Posted on 2019-05-30 | In Algorithm , LeetCode
Given the root of a binary tree with N nodes, each node in the tree has node.val coins, and there are N coins total. In one move, we may choose two ad ...
Read more »

[LeetCode] Problem 394 - Decode String

Posted on 2019-05-24 | In Algorithm , LeetCode
Given an encoded string, return it’s decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is b ...
Read more »

[LeetCode] Problem 809 - Expressive Words

Posted on 2019-05-24 | In Algorithm , LeetCode
Sometimes people repeat letters to represent extra feeling, such as “hello” -> “heeellooo”, “hi” -> “hiiii”. In these strings like “heeellooo”, ...
Read more »

[LeetCode] Problem 341 - Flatten Nested List Iterator

Posted on 2019-05-23 | In Algorithm , LeetCode
Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list – whose elements may also be intege ...
Read more »

[LeetCode] Problem 900 - RLE Iterator

Posted on 2019-05-23 | In Algorithm , LeetCode
Write an iterator that iterates through a run-length encoded sequence. The iterator is initialized by RLEIterator(int[] A), where A is a run-length en ...
Read more »

[LeetCode] Problem 284 - Peeking Iterator

Posted on 2019-05-23 | In Algorithm , LeetCode
Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation – it es ...
Read more »

[LintCode] Problem 601 - Flatten 2D Vector

Posted on 2019-05-22 | In Algorithm , LintCode
Implement an iterator to flatten a 2d vector. ExampleNo.1Input:[[1,2],[3],[4,5,6]] Output:[1,2,3,4,5,6] No.2Input:[[7,9],[5]] Output:[7,9,5] Code12345 ...
Read more »

[LeetCode] Problem 535 - Encode and Decode TinyURL

Posted on 2019-05-22 | In Algorithm , LeetCode
TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http ...
Read more »

[LeetCode] Problem 919 - Complete Binary Tree Inserter

Posted on 2019-05-21 | In Algorithm , LeetCode
A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possibl ...
Read more »
1…383940…78
mrlonelyjtr

mrlonelyjtr

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

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