//网页内调用微信扫码功能 //首先必须引入微信JS <script type='text/javascript' src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script> //1.html <div i ...
分类:
微信 时间:
2020-06-08 14:47:00
阅读次数:
91
class Solution(object): def isSameTree(self, p, q): """ :type p: TreeNode :type q: TreeNode :rtype: bool """ # 根节点值不同,树不同 if p.val != q.val: return Fa ...
分类:
其他好文 时间:
2020-06-08 14:46:48
阅读次数:
57
方法一:二分查找。 class Solution(object): # 二分查找 def kthSmallest(self, matrix, k): """ :type matrix: List[List[int]] :type k: int :rtype: int """ n = len(matr ...
分类:
其他好文 时间:
2020-06-08 14:43:04
阅读次数:
48
方法一:二分查找。 class Solution(object): # 二分法 def countNegatives(self, grid): """ :type grid: List[List[int]] :rtype: int """ ans = 0 for nums in grid: if n ...
分类:
其他好文 时间:
2020-06-08 14:39:50
阅读次数:
58
class Solution(object): def arrangeCoins(self, n): """ :type n: int :rtype: int """ return int(2 ** 0.5 * (n + 1 / 8) ** 0.5 - 1 / 2) if __name__ == ' ...
分类:
其他好文 时间:
2020-06-08 14:38:44
阅读次数:
59
class Solution(object): def searchRange(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ # 处理target不在nums中的情况 if ...
分类:
编程语言 时间:
2020-06-08 14:37:23
阅读次数:
54
class Solution(object): def findRadius(self, houses, heaters): """ :type houses: List[int] :type heaters: List[int] :rtype: int """ ans = [] heaters.s ...
分类:
其他好文 时间:
2020-06-08 14:25:21
阅读次数:
49
题意:即nums长为n+1,里面的元素值范围:[1,n],有且仅有一个重复值,但该值可以重复多次,所以[1,n]有的数可以不在nums里。 方法一:二分查找。 class Solution(object): # 二分查找 def findDuplicate(self, nums): low = 1 ...
分类:
其他好文 时间:
2020-06-08 14:17:49
阅读次数:
49
del_network def _unplug_port_from_network(self, port, network): server.log:37075:2020-06-08 10:12:54.569 56546 INFO networking_generic_switch.generic_ ...
分类:
Web程序 时间:
2020-06-08 10:48:14
阅读次数:
83
class Node: """先定一个node的类""" def __init__(self, value=None, next=None): self.value = value self.next = next def getValue(self): return self.value def ...
分类:
编程语言 时间:
2020-06-08 00:22:29
阅读次数:
55