日志的三个级别(书里写的关于回写和顺序两种模式不同的更细节的解释) 在很多日志文件系统(如:ext3, ReiserFS)中,可以选择三个级别的日志:回写(writeback)、顺序(ordered)和数据(data)。 回写 在回写模式中,只有元数据被记录到日志中,数据被直接写入主文件系统。这种模 ...
分类:
其他好文 时间:
2017-05-16 00:34:29
阅读次数:
167
Problem statement: Given two strings, find the longest common subsequence (LCS). Your code should return the length of LCS. Have you met this question ...
分类:
其他好文 时间:
2017-05-15 23:52:55
阅读次数:
381
Problem statement: Given an unsorted array of integers, find the length of longest increasing subsequence. For example,Given [10, 9, 2, 5, 3, 7, 101, ...
分类:
其他好文 时间:
2017-05-15 23:45:49
阅读次数:
159
1 public String longestPalindrome(String s) { 2 char[] ch = s.toCharArray(); 3 int longestLength = 0; 4 int[] longestIndex = {0, 0}; 5 for(int i = 0; ... ...
分类:
其他好文 时间:
2017-05-15 14:14:57
阅读次数:
150
1 public int lengthOfLongestSubstring(String s) { 2 char[] chars = s.toCharArray(); 3 //存储已遍历的元素中相应char值最后出现的位置 4 HashMap map = new HashMap(); 5 //当遍历... ...
分类:
其他好文 时间:
2017-05-14 13:40:20
阅读次数:
132
1. String getOrderedString(boolean isDuplicated, String … str) 说明: Orders all characters in the input strings and return the ordered string.(note: onl ...
分类:
编程语言 时间:
2017-05-13 23:18:25
阅读次数:
251
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l ...
分类:
其他好文 时间:
2017-05-13 16:08:33
阅读次数:
187
一、servletContext概述 servletContext对象是Servlet三大域对象之一,每个Web应用程序都拥有一个ServletContext对象,该对象是Web应用程序的全局对象或者上下文。Tomcat服务器在启动时,会自动创建一个ServletContext对象,在关闭时,会自动 ...
分类:
其他好文 时间:
2017-05-12 23:55:02
阅读次数:
275
前言 Spring中提供了一个Ordered接口。Ordered接口,顾名思义,就是用来排序的。 Spring是一个大量使用策略设计模式的框架,这意味着有很多相同接口的实现类,那么必定会有优先级的问题。 于是,Spring就提供了Ordered这个接口,来处理相同接口实现类的优先级问题。 Order ...
分类:
编程语言 时间:
2017-05-12 19:12:01
阅读次数:
240
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:
其他好文 时间:
2017-05-12 14:26:28
阅读次数:
102