mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[LintCode] Problem 663 - Walls and Gates

Posted on 2019-06-28 | In Algorithm , LintCode
You are given a m x n 2D grid initialized with these three possible values. -1 - A wall or an obstacle. 0 - A gate. INF - Infinity means an empty roo ...
Read more »

[LeetCode] Problem 130 - Surrounded Regions

Posted on 2019-06-28 | In Algorithm , LeetCode
Given a 2D board containing ‘X’ and ‘O’ (the letter O), capture all regions surrounded by ‘X’. A region is captured by flipping all ‘O’s into ‘X’s in ...
Read more »

[LeetCode] Problem 417 - Pacific Atlantic Water Flow

Posted on 2019-06-27 | In Algorithm , LeetCode
Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the “Pacific ocean” touches the left and top ...
Read more »

[LeetCode] Problem 331 - Verify Preorder Serialization of a Binary Tree

Posted on 2019-06-27 | In Algorithm , LeetCode
One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node’s value. If it is a null node, ...
Read more »

[LeetCode] Problem 515 - Find Largest Value in Each Tree Row

Posted on 2019-06-26 | In Algorithm , LeetCode
You need to find the largest value in each row of a binary tree. ExampleInput: 12345 1 / \ 3 2 / \ \ 5 3 9 Output: [1, 3, 9] Code1234 ...
Read more »

[LeetCode] Problem 513 - Find Bottom Left Tree Value

Posted on 2019-06-26 | In Algorithm , LeetCode
Given a binary tree, find the leftmost value in the last row of the tree. ExampleNo.1Input: 123 2 / \1 3 Output:1 No.2Input: 1234567 1 / \ 2 ...
Read more »

[LeetCode] Problem 103 - Binary Tree Zigzag Level Order Traversal

Posted on 2019-06-26 | In Algorithm , LeetCode
Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and ...
Read more »

[LeetCode] Problem 518 - Coin Change 2

Posted on 2019-06-25 | In Algorithm , LeetCode
You are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that a ...
Read more »

[LeetCode] Problem 322 - Coin Change

Posted on 2019-06-25 | In Algorithm , LeetCode
You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee ...
Read more »

[LeetCode] Problem 441 - Arranging Coins

Posted on 2019-06-25 | In Algorithm , LeetCode
You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. Given n, find the total number ...
Read more »
1…333435…78
mrlonelyjtr

mrlonelyjtr

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

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