- 博客(22)
- 收藏
- 关注
原创 852. Peak Index in a Mountain Array
—Easy https://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 206
原创 728. Self Dividing Numbers
—Easy https://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 236
原创 617. Merge Two Binary Trees
—Easy https://leetcode.com/problems/merge-two-binary-trees/ Code: class TreeNode(object): def __init__(self,x): self.val = x self.left = None self.right = None clas...
2019-04-02 09:55:46 166
原创 944. Delete Columns to Make Sorted
—Easy https://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 151
原创 461. Hamming Distance
—Easy https://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 187
原创 942. DI String Match
—Easy https://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 192
原创 657. Robot Return to Origin
—Easy https://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 209
原创 Leetcode-832. Flipping an Image
—Easy https://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 188
原创 CityPersons: A Diverse Dataset for Pedestrian Detection
https://arxiv.org/abs/1702.05693 2019.2.23-2019.3.2 1.baseline 2.提升小目标检测的5个方法 3.CityPerson数据集的generalization
2019-03-02 19:49:19 3099
原创 Leetcode-905. Sort Array By Parity
—Easy https://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 304
原创 Leetcode-977. Squares of a Sorted Array
—Easy https://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 281
原创 Leetcode-961. N-Repeated Element in Size 2N Array
—Easy https://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 170
原创 Leetcode-804. Unique Morse Code Words
—Easy https://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 182
原创 Leetcode-999. Available Captures for Rook
—Easy https://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 363
原创 Leetcode-709. To Lower Case
—Easy https://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 202
原创 Leetcode-929. Unique Email Addresses
—Easy https://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 237
原创 Leetcode-771. Jewels and Stones
—Easy https://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 184
原创 Leetcode-463. Island Perimeter
—Easy https://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 211
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人