- 博客(22)
- 收藏
- 关注
原创 852. Peak Index in a Mountain Array
—Easyhttps://leetcode.com/problems/peak-index-in-a-mountain-array/Code:class Solution: def peakIndexInMountainArray(self, A) -> int: ans_flag = False for i in range(...
2019-04-04 10:13:16 202
原创 728. Self Dividing Numbers
—Easyhttps://leetcode.com/problems/self-dividing-numbers/Code:class Solution(object): def selfDividingNumbers(self, left: int, right: int) : ans_list = [] for i in rang...
2019-04-02 10:13:47 232
原创 617. Merge Two Binary Trees
—Easyhttps://leetcode.com/problems/merge-two-binary-trees/Code:class TreeNode(object): def __init__(self,x): self.val = x self.left = None self.right = Noneclas...
2019-04-02 09:55:46 162
原创 944. Delete Columns to Make Sorted
—Easyhttps://leetcode.com/problems/delete-columns-to-make-sorted/Code:class Solution: def minDeletionSize(self, A) -> int: ans = [1]*len(A[0]) tmp = A[0] for...
2019-03-10 17:16:18 146
原创 461. Hamming Distance
—Easyhttps://leetcode.com/problems/hamming-distance/Code:class Solution: def hammingDistance(self, x: int, y: int) -> int: ans = 0 X = list(map(int,list(bin(x).replace...
2019-03-10 16:30:22 183
原创 942. DI String Match
—Easyhttps://leetcode.com/problems/di-string-match/class Solution: def diStringMatch(self, S: str) : N = len(S) list_ans = [] start = 0 end = N fo...
2019-03-10 11:18:37 188
原创 657. Robot Return to Origin
—Easyhttps://leetcode.com/problems/robot-return-to-origin/Code:class Solution: def judgeCircle(self, moves: str) -> bool: count_h = 0 count_v = 0 for char in m...
2019-03-10 11:02:34 202
原创 Leetcode-832. Flipping an Image
—Easyhttps://leetcode.com/problems/flipping-an-image/Code:class Solution: def flipAndInvertImage(self, A) : ans_ma = [] for ls in A: ls = ls[::-1] ...
2019-03-03 11:37:14 184
原创 CityPersons: A Diverse Dataset for Pedestrian Detection
https://arxiv.org/abs/1702.056932019.2.23-2019.3.21.baseline2.提升小目标检测的5个方法3.CityPerson数据集的generalization
2019-03-02 19:49:19 3091
原创 Leetcode-905. Sort Array By Parity
—Easyhttps://leetcode.com/problems/sort-array-by-parity/Code:class Solution: def sortArrayByParity(self, A ): ans_ls_even = [] ans_ls_odd = [] for elt in A: ...
2019-03-01 15:01:12 299
原创 Leetcode-977. Squares of a Sorted Array
—Easyhttps://leetcode.com/problems/squares-of-a-sorted-array/Code:class Solution: def sortedSquares(self, A) : ans_list = [] for elt in A: ans_list.append(elt...
2019-03-01 14:52:37 271
原创 Leetcode-961. N-Repeated Element in Size 2N Array
—Easyhttps://leetcode.com/problems/n-repeated-element-in-size-2n-array/Code:class Solution: def repeatedNTimes(self, A) -> int: list_number = [] for elt in A: ...
2019-03-01 11:29:12 166
原创 Leetcode-804. Unique Morse Code Words
—Easyhttps://leetcode.com/problems/unique-morse-code-words/Code:class Solution: def uniqueMorseRepresentations(self, words) -> int: dict_umcw = {'a':".-",'b':"-...",'c':"-.-.",...
2019-03-01 11:04:22 178
原创 Leetcode-999. Available Captures for Rook
—Easyhttps://leetcode.com/problems/available-captures-for-rook/Code:class Solution: def numRookCaptures(self, board) -> int: ans_cnt = 0 m = len(board) n = len(b...
2019-03-01 10:21:09 357
原创 Leetcode-709. To Lower Case
—Easyhttps://leetcode.com/problems/to-lower-case/Code: class Solution: def toLowerCase(self, str: str) -> str: s = str.lower() return s# s = Solution()# print(s.to...
2019-02-26 20:42:44 199
原创 Leetcode-929. Unique Email Addresses
—Easyhttps://leetcode.com/problems/unique-email-addresses/Code: class Solution: def numUniqueEmails(self, emails) -> int: new_em = [] for elt in emails: i...
2019-02-26 18:29:34 233
原创 Leetcode-771. Jewels and Stones
—Easyhttps://leetcode.com/problems/jewels-and-stones/Code: class Solution: def numJewelsInStones(self, J, S): ans = 0 for elt in S : if elt in J: ...
2019-02-26 15:30:18 180
原创 Leetcode-463. Island Perimeter
—Easyhttps://leetcode.com/problems/island-perimeter/ Code: class Solution: def islandPerimeter(self, grid) : sum_count = 0 if len(grid) == 0: return 0 ...
2019-02-25 20:32:43 207
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人