首页 > 其他
Longest Continuance Increasing sub-sequence in matrix
一个矩阵,求最长连续的序列长度 [1 2 3 4 5 6 7 8 9] 我的解法时用dfs遍历矩阵,如果便利过的元素就标记为false,不再遍历。 邻居 就是上下左右 e.g. 1 2 3 6 5 4 -> 7 7 9 8 =================== 5 7 9 1 2 3 -> 3 4 ...
分类:其他   时间:2016-04-03 07:19:41    收藏:0  评论:0  赞:0  阅读:167
81. Search in Rotated Sorted Array II
和1相比就是多了一个可能,就是截断以后两头一样,所以如果两头是一样的,就往前移动到不一样的地方就好了 读了23,24两行 ...
分类:其他   时间:2016-04-03 07:19:31    收藏:0  评论:0  赞:0  阅读:155
[LeetCode] Second Highest Salary 第二高薪水
Write a SQL query to get the second highest salary from the Employee table. For example, given the above Employee table, the second highest salary is  ...
分类:其他   时间:2016-04-03 07:18:42    收藏:0  评论:0  赞:0  阅读:209
opencv2 矩阵方式 resize图像缩放代码(转载)
http://blog.sina.com.cn/s/blog_74a459380101r0yx.html opencv2 矩阵方式 resize图像缩放代码(转载) (2014-05-16 09:55:35) 转载▼ opencv2 矩阵方式 resize图像缩放代码(转载) 转载▼ 分类: Ope ...
分类:其他   时间:2016-04-03 07:18:21    收藏:0  评论:0  赞:0  阅读:159
[LeetCode] Nth Highest Salary 第N高薪水
Write a SQL query to get the nth highest salary from the Employee table. For example, given the above Employee table, the nth highest salary where n = ...
分类:其他   时间:2016-04-03 07:13:01    收藏:0  评论:0  赞:0  阅读:250
82. Remove Duplicates from Sorted List II
三个指针,一个pre,一个cur,一个next(下一个不同的数字) 如果不遇到重复数字,那么三个都往前移一格 如果遇到重复数字,那么pre.next = next,这个时候pre并没有改变 ...
分类:其他   时间:2016-04-03 07:12:52    收藏:0  评论:0  赞:0  阅读:193
[LeetCode] Combine Two Tables 联合两表
Table: Person Table: Address Write a SQL query for a report that provides the following information for each person in the Person table, regardless if ...
分类:其他   时间:2016-04-03 07:10:12    收藏:0  评论:0  赞:0  阅读:229
lamp环境配置
ubantu环境配置lamp比较简单 我用的14.0.4. 用xshell连接服务器 如果不是root用户,则在命令指令前加sudo,root用户则不需要 1.安装Apache apt-get install apache2 这是安装Apache服务器的指令,中间选择依次[y/n],选择y来确认 如 ...
分类:其他   时间:2016-04-03 07:08:53    收藏:0  评论:0  赞:0  阅读:131
284. Peeking Iterator
本来的Iterator类里面是自带next()和hasNext()的,但是现在加了peek()之后会调用一次iterator.next(),然后iterator的顺序就乱了。 所以一旦被peek过我们就需要把这个被next()弹出的元素记录下来,如果再调用next就返回这个临时的元素,再调用peek ...
分类:其他   时间:2016-04-03 07:05:31    收藏:0  评论:0  赞:0  阅读:99
80. Remove Duplicates from Sorted Array II
就是比之前的多一个flag记录有没有重复过一次 ...
分类:其他   时间:2016-04-03 07:05:21    收藏:0  评论:0  赞:0  阅读:180
33. Search in Rotated Sorted Array
虽然是hard难度,其实也没有很难 分为三种情况: 1. 如果nums[mid] == target 那么返回mid 2. 如果nums[mid] < nums[right] 那么说明在nums里面,从mid到right的顺序是正确的,所以: 1)如果target值范围介于nums[mid]和num ...
分类:其他   时间:2016-04-03 07:05:02    收藏:0  评论:0  赞:0  阅读:212
康托展开 / 逆康托展开
先搬一下(戳)维基百科的康托展开(戳): 康托展开是一个全排列到一个自然数的双射,常用于构建哈希表时的空间压缩。 康托展开的实质是计算当前排列在所有由小到大全排列中的顺序,因此是可逆的。 由于是双射 所以可以求n的全排列里第k大的排列(逆康托展开) (伪)计算原理: 从某个元素找后面比这个元素小的数 ...
分类:其他   时间:2016-04-03 06:59:52    收藏:0  评论:0  赞:0  阅读:193
BST (Binary Search Tree)
If you need to maintain a list of objects that are sorted and unique & if you need to be able to quickly insert and retrieve objects to and from this ...
分类:其他   时间:2016-04-03 06:58:11    收藏:0  评论:0  赞:0  阅读:128
140201126-杨鹏飞-作业五
class Person3{ private String name; private String addr; private String sex; private int age; public Person3(String name,String addr,String sex,int ag ...
分类:其他   时间:2016-04-03 06:57:51    收藏:0  评论:0  赞:0  阅读:237
菜鸟成长记(八)----- 一个萝卜一个坑
“生活不止眼前的苟且,还有诗和远方……”,忍受着现在的苟且,只是因为心中还存有自己未到过的远方?远方,好模糊的一个词,自己都不清楚它到底通向何方,落脚点在何处!或许,也正因为一切未知,通向它的路途才更有趣,也正因为如此,它才更值得自己去努力,去探索吧。。 上班的时间总感觉要比读书的时候过得快很多,很 ...
分类:其他   时间:2016-04-03 06:57:41    收藏:0  评论:0  赞:0  阅读:152
Nginx文件类型错误解析漏洞--攻击演练
今天看书看到其中提到的一个漏洞,那就是Nginx+PHP的服务器中,如果PHP的配置里 cgi.fix_pathinfo=1 那么就会产生一个漏洞。这个配置默认是1的,设为0会导致很多MVC框架(如Thinkphp)都无法运行。这个漏洞就是比如 localhost/img/1.jpg 是正常地访问一 ...
分类:其他   时间:2016-04-03 06:57:32    收藏:0  评论:0  赞:0  阅读:161
LB 负载均衡的层次结构(转)
作为后端应用的开发者,我们经常开发、调试、测试完我们的应用并发布到生产环境,用户就可以直接访问到我们的应用了。但对于互联网应用,在你的应用和用户之间还隔着一层低调的或厚或薄的负载均衡层软件,它们不显山不露水默默的发挥着重要的作用,以至于我们经常忽略了它们的存在。因为负载均衡层通常不在一般开发人员的问 ...
分类:其他   时间:2016-04-03 06:57:11    收藏:0  评论:0  赞:0  阅读:289
sublime text 快捷键
Mac 备注:具体符号对应的按键 ?Command key ?Control key ?Option key ?Shift Key hotkey ?[向左缩进 | Left indent ?]向右缩进 | Right Indent ??↑与上一行互换(超实用!)| Swap line up ??↓与 ...
分类:其他   时间:2016-04-03 06:57:01    收藏:0  评论:0  赞:0  阅读:248
备忘录
八数码:貌似直接广搜,用康托展开(重看、记录)或hash(学习、记录)或STL的set判重 Python正则表达式、文件操作 学习 尝试对html进行解析 字典树、KMP、AC自动机(学习、记录) ...
分类:其他   时间:2016-04-03 06:56:52    收藏:0  评论:0  赞:0  阅读:179
Nginx 使用IP限制访问来源
在 server {... 下, 或者在 location xxx {... 下, 都可以添加如下的IP访问限制 如果只需要禁止某些IP访问, 可以使用 ...
分类:其他   时间:2016-04-03 06:56:21    收藏:0  评论:0  赞:0  阅读:221
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!