two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note:A solution using O(n) space i ...
分类:
其他好文 时间:
2017-02-21 21:52:21
阅读次数:
190
自定义拦截器 1>.添加一个类,让它继承AbstractInterceptor类,或者实现Interceptor接口 public class TimeInterceptor extends AbstractInterceptor { /** * 拦截器的核心方法intercept的返回值是一个字符 ...
分类:
其他好文 时间:
2017-02-21 17:59:56
阅读次数:
183
代码中已经加入了注释,需要的朋友可以直接参考代码中的注释。下面直接上功能实现的主要代码: 下面是测试代码: 参考资料:http://www.iteye.com/topic/427397这篇文章对断点续传的原理做了较详细的解释。 ...
分类:
编程语言 时间:
2017-02-20 12:55:35
阅读次数:
263
516. Longest Palindromic Subsequence Add to List 516. Longest Palindromic Subsequence Add to List Add to List Description Submission Solutions Total A ...
分类:
其他好文 时间:
2017-02-20 10:46:26
阅读次数:
204
读文件: $myfile = fopen("webdictionary.txt", "r") or die("Unable to open file!");echo fread($myfile,filesize("webdictionary.txt"));fclose($myfile); 写文件: ...
分类:
Web程序 时间:
2017-02-20 00:58:15
阅读次数:
258
Docker容器使用静态独立的外部IP(便于集群组建) 收藏 孤岛旭日 发表于 1年前 阅读 1404 收藏 12 点赞 0 评论 1 Docker容器使用静态独立的外部IP(便于集群组建) 收藏 孤岛旭日 发表于 1年前 阅读 1404 收藏 12 点赞 0 评论 1 收藏 收藏 孤岛旭日 发表于 ...
分类:
其他好文 时间:
2017-02-19 15:33:05
阅读次数:
359
function GetQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if (r !==... ...
分类:
Web程序 时间:
2017-02-18 21:05:40
阅读次数:
153
在Java语言中,字符串数据实际上由String类所实现的。Java字符串类分为两类:一类是在程序中不会被改变长度的不变字符串;另一类是在程序中会被改变长度的可变字符串。Java环境为了存储和维护这两类字符串提供了 String和StringBuffer两个类(在JDK1.5版本后出现了String ...
分类:
编程语言 时间:
2017-02-18 19:50:10
阅读次数:
285
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. https://leetcode.com/problems/convert-sorted-array-t ...
分类:
其他好文 时间:
2017-02-18 09:34:59
阅读次数:
146