Hexo


  • 首頁

  • 分類

  • 關於

  • 歸檔

  • 標籤

lc217-Contains Duplicate

發表於 2016-01-30   |   分類於 leetcode   |   0 comments   |  
1
2
3
4
5
6
7
8
9
10
class Solution(object):
def containsDuplicate(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
d = {}
for x in nums:
d[x] = x
return len(d) != len(nums)
#lc-easy #array #hash-table
lc39-Combination Sum
lc274
  • 文章目錄
  • 本站概覽
Jane Doe

Jane Doe

93 文章
4 分類
41 標籤

此文章未包含目錄

©   2017 Jane Doe 本站訪客數 人 本站總訪問量 次