Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex ...
分类:
其他好文 时间:
2019-09-15 11:37:10
阅读次数:
103
path sum Given a binary tree and a sum,determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the give... ...
分类:
其他好文 时间:
2019-09-14 22:50:59
阅读次数:
113
报错为Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization 错误原因,是因为linux网卡绑定了原mac地址导致 解决方法为 1.使用ifconfig -a 查看当前主机 ...
分类:
系统相关 时间:
2019-09-14 16:20:41
阅读次数:
124
1、直连路由——在路由器接口上配置的网络将自动产生路由,来源为路由器自身接口。比如路由器的某个接口配置的IP地址192.168.1.1/24,那么路由器里将自动生成路由192.168.1.0/24到这个接口,只要接口处于物理up状态,该路由将一直存在。以字母C(Connected)标识。2、静态路由——使用命令配置在路由器里的路由,来源为用户手工输入。只要命令不消失,该路由将一直存在。以字母S(S
分类:
其他好文 时间:
2019-09-14 00:41:32
阅读次数:
799
1. Two Sum Easy Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each inp ...
分类:
其他好文 时间:
2019-09-13 22:25:49
阅读次数:
95
最大堆实现 代码 #!/usr/bin/envpython #-*-coding:utf-8-*- #单个叶子节点进行上浮调整位置 deffloat_up(array,start): parent=(start-1)//2 ifstart==0: retur... ...
分类:
其他好文 时间:
2019-09-13 20:01:42
阅读次数:
121
乱搞线段树,单点修改,每次询问整个表达式的值 不同点在于up函数需要进行修改,根据区间长度不同运算符号也有所不同 代码: ...
分类:
其他好文 时间:
2019-09-13 19:12:59
阅读次数:
94
思路:结果"even"者均为正确硬币。则用数组flag[]进行标记,后面再次遇到该枚硬币则自动忽略。 处理错误硬币:我们遇到结果"up"除已判断正确的硬币外,左面硬币flag[]值-1.右面硬币flag值+1.遇到结果"down"因左面差异硬币整体较轻则-1,右面+1 结果处理:abs值最大者为错误 ...
分类:
其他好文 时间:
2019-09-13 17:25:29
阅读次数:
81
2557: Above the Median 题目描述 Farmer John has lined up his N (1 <= N <= 100,000) cows in a row to measure their heights; cow i has height H_i (1 <= H_i ...
分类:
其他好文 时间:
2019-09-13 15:49:29
阅读次数:
88
Jack was trying to go up the hill. He does not have any problem in climbing up or coming down the hill if the slope is consistently either increasing ...
分类:
其他好文 时间:
2019-09-12 09:58:27
阅读次数:
101