https://codeforces.com/contest/1287/ A Angry Students D Numbers on Tree 题意:给一棵有根树,规定每个数的子树中有多少个节点的val比根节点的严格小。给这棵树填上任意一种合法的val(每个值都在[1,10^9]且满足上一句话)或报 ...
分类:
其他好文 时间:
2020-01-06 12:33:58
阅读次数:
61
第一课创建和使用字典#创建和使用字典#我们以前讲过2种序列:1列表2元组#共同点:都是通过索引引用元素值#不同点:列表是可读写的,元组是只读的names=["Bill","Mike","John","Mary"]numbers=["1234","4321","6789","6543"]print(numbers[names.index("Mike")])#4321通过names中的Mike的索引位
分类:
其他好文 时间:
2020-01-06 11:09:55
阅读次数:
138
链接:https://leetcode-cn.com/problems/add-two-numbers-ii 给定两个非空链表来代表两个非负整数。数字最高位位于链表开始位置。它们的每个节点只存储单个数字。将这两数相加会返回一个新的链表。 你可以假设除了数字 0 之外,这两个数字都不会以零开头。 进阶 ...
分类:
其他好文 时间:
2020-01-05 20:43:28
阅读次数:
79
TCP握手协议 在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接.第一次握手:建立连接时,客户端发送syn包(syn=j)到服务器,并进入SYN_SEND状态,等待服务器确认; SYN:同步序列编号(Synchronize Sequence Numbers)第二次握手:服 ...
分类:
其他好文 时间:
2020-01-05 15:48:17
阅读次数:
117
Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any ...
分类:
其他好文 时间:
2020-01-05 11:56:36
阅读次数:
74
https://leetcode.com/problems/path-sum-iii/ https://leetcode.com/problems/path-sum-iv/ https://leetcode.com/problems/maximum-product-of-three-numbers/ ...
分类:
其他好文 时间:
2020-01-05 11:39:50
阅读次数:
78
Description Soluction public class Solution { public int myAtoi(String str) { char[] numbers = str.toCharArray(); // sign symbol, 1 for positive, -1 f ...
分类:
其他好文 时间:
2020-01-04 12:21:28
阅读次数:
77
一次SQL查询优化原理分析(900W+数据,从17s到300ms) Muscleape关注 132019.12.09 00:48:52字数 1,163阅读 2,730 有一张财务流水表,未分库分表,目前的数据量为9555695,分页查询使用到了limit,优化之前的查询耗时16 s 938 ms ( ...
分类:
数据库 时间:
2020-01-04 10:57:50
阅读次数:
145
第四课:序列的乘法(字符串乘法)#序列的乘法#序列和一个整数相乘序列的乘法可以达到复制整数份的字符串的效果s="a"print(s*12)#aaaaaaaaaaaanumbers=[1,2,3,4,5]print(numbers*3)#[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5]#打印正三角*号的功能‘‘‘[‘‘,‘‘,‘‘,‘‘,‘‘,‘*‘,‘‘,‘‘,‘‘,‘‘,‘‘][‘
分类:
编程语言 时间:
2020-01-03 22:53:14
阅读次数:
92
来源:http://codeforces.com/problemset/problem/1265/B B. Beautiful Numbers time limit per test 1 second memory limit per test 256 megabytes input standar ...
分类:
其他好文 时间:
2020-01-02 22:33:54
阅读次数:
59