链接:https://leetcode-cn.com/problems/3sum-closest/ 代码 class Solution { public int threeSumClosest(int[] nums, int target) { int ans = nums[0] + nums[1] ...
分类:
其他好文 时间:
2020-06-13 17:24:10
阅读次数:
58
class Solution { public static List<List<Integer>> threeSum(int[] nums) { List<List<Integer>> ans = new ArrayList(); int len = nums.length; if(nums == ...
分类:
编程语言 时间:
2020-06-13 15:42:57
阅读次数:
95
MB SD Connect Compact 5 is new released from MB Star company ,and its original version here the copy version per my sale experience,can not compared w ...
分类:
其他好文 时间:
2020-06-13 13:25:11
阅读次数:
74
#E - Ehab and Path-etic MEXs 题目链接:https://vjudge.net/contest/377554#problem/E ###涉及知识点: 思维 ###solution: 其实这个题主要是题意比较难懂 下面是我的做法: 先记录下来每个点的入度,把入度为1的点的边从 ...
分类:
其他好文 时间:
2020-06-13 13:17:58
阅读次数:
74
\(\color{red}{Link}\) \(\color{blue}{\text{Solution:}}\) 题目要求构造一个最短的序列,使得异或和为$u$,数列和为$v$. 那么,因为是异或,所以最终序列的$u$对应的二进制位一定出现了奇数次,其他一定是偶数次。 显然$u,v$奇偶性不同或是$ ...
分类:
其他好文 时间:
2020-06-13 11:24:53
阅读次数:
526
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = Nonefrom typing import Listclass Solution: # 迭代的想法 def levelOrderBot ...
分类:
其他好文 时间:
2020-06-13 00:42:24
阅读次数:
46
题目: 将一个字符串转换成一个整数,要求不能使用字符串转换整数的库函数。 数值为0或者字符串不是一个合法的数值则返回0 输入描述: 输入一个字符串,包括数字字母符号,可以为空 示例1 输入:+2147483647, 1a33 输出:2147483647, 0 1 class Solution { 2 ...
分类:
其他好文 时间:
2020-06-13 00:21:40
阅读次数:
47
class Solution(object): def threeSum(self, nums): res_list=[] nums.sort() for i in range(len(nums)): if(nums[i]>0): break if i>0 and nums[i]==nums[i-1 ...
分类:
其他好文 时间:
2020-06-13 00:12:53
阅读次数:
120
一、安装接口需要用到的库 1、安装Requests库 pip install requestspip install --upgrade requestspip install -U requests由于robotframework-requests库依赖这个requests库,注意:安装的先后顺序 ...
分类:
其他好文 时间:
2020-06-12 14:51:18
阅读次数:
104
背景 在系统生命周期中, 免不了要做升级部署, 对于关键服务, 我们应该能做到不停服务完成升级 (perform a zero downtime upgrade), 对于一般系统, 应该做到优雅地停服务. 如何做到不停服务的升级? 需要做到下面两点:1. 服务本身应该部署多份, 前面应该有 LVS/ ...
分类:
编程语言 时间:
2020-06-12 14:23:25
阅读次数:
59