摘要:
Python-dict 和 setdictPython内置了字典:dict的支持,dict全称dictionary,在其他语言中也称为map,使用键-值(key-value)存储 定义格式:>>>dic = {'Miachel':95,'Bob':75,'Tracy':85}>>>d... 阅读全文
posted @ 2017-11-18 16:58
link98
阅读(151)
评论(0)
推荐(0)
摘要:
Python学习笔记-1ListPython内置的一种数据类型是列表:list。list是一种有序的集合,可以随时添加和删除其中的元素。 定义格式:classmates = ['ichel','Bob','Tom']可以用 len() 来获取 list 的长度>>>len(class... 阅读全文
posted @ 2017-11-18 16:06
link98
阅读(118)
评论(0)
推荐(0)
摘要:
563. Binary Tree TiltGiven a binary tree, return the tilt of the whole tree.The tilt of a tree node is defined as the absolute difference between the ... 阅读全文
posted @ 2017-11-18 10:53
link98
阅读(126)
评论(0)
推荐(0)
摘要:
404. Sum of Left LeavesFind the sum of all left leaves in a given binary tree.Example: 3 / \ 9 20 / \ 15 7There are two left leaves in ... 阅读全文
posted @ 2017-11-17 11:31
link98
阅读(101)
评论(0)
推荐(0)
摘要:
383. Ransom NoteGiven an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return ... 阅读全文
posted @ 2017-11-16 22:56
link98
阅读(99)
评论(0)
推荐(0)
摘要:
349. Intersection of Two ArraysGiven two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], re... 阅读全文
posted @ 2017-11-15 17:32
link98
阅读(127)
评论(0)
推荐(0)
摘要:
453. Minimum Moves to Equal Array ElementsGiven a non-empty integer array of size n, find the minimum number of moves required to make all array eleme... 阅读全文
posted @ 2017-11-12 10:28
link98
阅读(118)
评论(0)
推荐(0)
摘要:
697. Degree of an ArrayGiven a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one ... 阅读全文
posted @ 2017-11-11 15:52
link98
阅读(119)
评论(0)
推荐(0)
摘要:
598. Range Addition IIGiven an m * n matrix M initialized with all 0's and several update operations.Operations are represented by a 2D array, and eac... 阅读全文
posted @ 2017-11-09 17:00
link98
阅读(166)
评论(0)
推荐(0)
摘要:
492. Construct the RectangleFor a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web pa... 阅读全文
posted @ 2017-11-08 17:30
link98
阅读(144)
评论(0)
推荐(0)
浙公网安备 33010602011771号