package LeetCode_264 import java.util.* /** * 264. Ugly Number II * https://leetcode.com/problems/ugly-number-ii/description/ * * Write a program to f ...
分类:
其他好文 时间:
2020-08-25 18:43:43
阅读次数:
51
题目描述 请你来实现一个 atoi 函数,使其能将字符串转换成整数。 首先,该函数会根据需要丢弃无用的开头空格字符,直到寻找到第一个非空格的字符为止。接下来的转化规则如下: 如果第一个非空字符为正或者负号时,则将该符号与之后面尽可能多的连续数字字符组合起来,形成一个有符号整数。 假如第一个非空字符是 ...
分类:
其他好文 时间:
2020-08-19 19:39:35
阅读次数:
58
CentOS7.8Zabbix4.4MariaDB10.3.23PHP7.2根据官方文档从4.4升级5.0https://www.zabbix.com/documentation/current/manual/installation/upgrade/packages/rhel_centos 升级大致过程systemctlstopzabbix-serverrpm-Uvhhtt
分类:
其他好文 时间:
2020-08-17 17:03:24
阅读次数:
86
CentOS7.8之前从7.5升级PHP7.2之前从5.4升级MariaDB10.3.23之前从5.5升级Zabbix4.2版本之前从4.0升级上来的)理论应该可以4.0直接升级到4.4或5.0根据官方文档升级https://www.zabbix.com/documentation/4.4/manual/installation/upgrade/packages/rhel_centos升级完成遇到
分类:
其他好文 时间:
2020-08-17 16:48:03
阅读次数:
94
题目 给定一个二叉树,返回它的中序 遍历。 实现 # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def inorderTraversal(self, roo ...
分类:
其他好文 时间:
2020-08-15 22:23:27
阅读次数:
69
43. 字符串相乘 题解: 模拟两个字符串相乘的过程,字符串A第i位和B第j位的相乘结果在结果C的第 i+j+1位(从0开始计数) class Solution(object): def multiply(self, num1, num2): """ :type num1: str :type nu ...
分类:
其他好文 时间:
2020-08-13 12:43:25
阅读次数:
61
1、进入root目录 cd ~ 2、建立.pip文件夹 mkdir .pip 3、进入.pip文件夹 cd .pip 4、编辑pip.conf文件 vi pip.conf [global] index-url = https://mirrors.aliyun.com/pypi/simple/ [in ...
分类:
其他好文 时间:
2020-08-11 13:09:19
阅读次数:
72
$\mathcal Link. 称排列 \(\{p_n\}\) 美妙,当且仅当 \((\forall i\in[1,n))(\max_{j\in[1,i]}\{p_i\}>\min_{j\in(i,n]}\{p_j\})\)。求长度为 \(n\) 的美妙排列个数。多测。 \(n\le10^5\)。 ...
分类:
其他好文 时间:
2020-08-10 22:09:38
阅读次数:
85
给定一个长度为n的数组a,它有n(n+1)/2??个子数组。请计算这些子数组的和,然后按照升序排列,并返回排序后第k个数。 1≤n≤10?^5 1≤a?i≤10^?9 1≤k≤?n(n+1)/2 在线评测地址:点击此处前往 Example1 Input: [2,3,1,4] 6 Output:5 E ...
分类:
编程语言 时间:
2020-08-10 11:03:25
阅读次数:
93
from typing import List# 这道题不是很难,但是限制条件有很多。# 用递归的方法可以很容易的想到。只需要四层递归就好了。# 每次进行加上限制条件。过滤每一层就好了。、class Solution: def restoreIpAddresses(self, s: str) -> ...
分类:
其他好文 时间:
2020-08-09 13:07:19
阅读次数:
66