- 博客(11)
- 收藏
- 关注
原创 Leetcode-1025. Divisor Game
Original link: https://leetcode.com/problems/divisor-game/ The code is super stupid. class Solution(object): def divisorGame(self, N): """ :type N: int :rtype: bool ...
2019-07-17 13:21:45
175
原创 Leetcde-931. Minimum Falling Path Sum
Original link: https://leetcode.com/problems/minimum-falling-path-sum/ For elements in the second line and below, we can search the upper two or three elements and add the minimum value. Boundary cond...
2019-07-17 12:27:03
196
原创 Leetcode-739. Daily Temperatures
Original link: https:// leetcode.com/problems/daily-termperatures Given a list of daily temperatures, return a list such that tell how many days you would have to wait until a warmer temperature.
2019-07-17 12:08:40
173
原创 Leetcode-73. Set Matrix Zeroes
Original link: https://leetcode.com/problems/set-matrix-zeroes/
2019-07-13 13:28:56
243
原创 Leetcode-338. Counting Bits
Original link: https://leetcode.com/problems/counting-bits/
2019-07-12 12:58:35
160
原创 【To Be Continued】数字图像处理(第三版)阅读中的问题与思考
#####2.5.2 邻接性、连通性、区域和边界(P39) 令S是图像中的一个像素子集。如果S的全部像素之间存在一个通路,则可以说两个像素p和q在S中是联通的。对于S中的任何像素p,S中联通到该像素的像素集称为S的连通分量。如果S仅有一个连通分量,则集合S称为联通集。 什么是联通集??? ...
2019-07-10 12:14:15
215
原创 Leetcode-1052. Grumpy Bookstore Owner
Original link: https://leetcode.com/problems/grumpy-bookstore-owner/ First, count customers when the owner is impossible to be grumpy Then use a rolling sum to calculate the maximum number of customer...
2019-07-10 10:32:57
187
原创 Leetcode-1011. Capacity to Ship Packages Within D Days
Original link: https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/ Inspired by Hint: Binary search on the answer. We need a function possible(capacity) which returns true if and onl...
2019-07-10 10:27:35
279
原创 Leetcode-1110. Delete Nodes and Return Forest
Original Link: https://leetcode.com/problems/delete-nodes-and-return-forest/ First, consider a similar but replacing trees to linked node question, There are two kinds of nodes: To be deleted (D) and ...
2019-07-10 10:06:11
317
原创 Leetcode-1109. Corporate Flight Bookings
Original link: https://leetcode.com/problems/corporate-flight-bookings/ Example: Input: bookings = [[1,2,10],[2,3,20],[2,5,25]], n = 5 Output: [10,55,45,25,25] Intuitive method: Initialize an array wh...
2019-07-08 00:23:52
449
原创 Leetcode-78. Subsets
Original link: https://leetcode.com/problems/subsets/ Output length = C(0,n) + C(1,n) … + C(n,n) We can do it recursively. When the length of nums is larger than 2, we exclude one element using a for ...
2019-07-07 05:30:20
203
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人