码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
spoj 1811
1811. Longest Common SubstringProblem code: LCSA string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is the set o...
分类:其他好文   时间:2015-01-07 23:22:12    阅读次数:154
俗名猴子选大王,学名约瑟夫环
有n 个人围成一圈,顺序排号。从第一个人开始报数(从1到3报数), 凡报到3的人退出圈子,问最后留下的是原来第几号的那位。 public class Baochu { public static void main(String[] args) { Res(10,3); } public static void Res(int n,int flag){ List li...
分类:其他好文   时间:2015-01-07 22:11:58    阅读次数:208
[leetcode]
问题描述: Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences. For example, given ...
分类:其他好文   时间:2015-01-07 22:09:58    阅读次数:295
快速排序
快速排序 1 package t0107; 2 3 public class PaiXu { 4 5 /** 6 * 快速排序 7 */ 8 public void quickSort(String[] strDate, int left, int right...
分类:编程语言   时间:2015-01-07 21:51:37    阅读次数:179
POJ 1068-Parencodings(模拟)
Parencodings Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 20444   Accepted: 12303 Description Let S = s1 s2...s2n be a well-formed string of parentheses...
分类:其他好文   时间:2015-01-07 20:58:02    阅读次数:168
遍历Map的四种方法
1 public static void main(String[] args) { 2 3 4 Map map = new HashMap(); 5 map.put("1", "value1"); 6 map.put("2", "value2"); 7 map.put("3"...
分类:其他好文   时间:2015-01-07 20:50:24    阅读次数:139
PHP中CURL方法curl_setopt()函数的参数
PHP CURL curl_setopt 参数boolcurl_setopt(int ch, string option, mixed value)curl_setopt()函数将为一个CURL会话设置选项。option参数是你想要的设置,value是这个选项给定的值。下列选项的值将被作为长整形使用...
分类:Web程序   时间:2015-01-07 20:32:24    阅读次数:276
mockito
参考了http://qiuguo0205.iteye.com/blog/1456528?的博客,谢谢! 1、验证动作,我调用了哪些方法。 ? ? ?? ?List<String> ?mockedList = mock(List.class); ? ? ? ? mockedList.add("one"); ? ? ? ...
分类:其他好文   时间:2015-01-07 19:20:03    阅读次数:148
利用Scala解析器组合子编写乘除法解析器
importscala.util.parsing.combinator.JavaTokenParsers objectParserCombinatorextendsJavaTokenParsers{ defmain(args:Array[String]){ valmultiply:Parser[Double]=floatingPointNumber~rep( ("*"|"/")~floatingPointNumber^^{ case"*"~(factor:String)=>left:Double=&..
分类:其他好文   时间:2015-01-07 19:17:38    阅读次数:146
[LeetCode]127 Word Ladder
https://oj.leetcode.com/problems/word-ladder/http://blog.csdn.net/linhuanmars/article/category/1918893/2publicclassSolution{ publicintladderLength(Stringstart,Stringend,Set<String>dict) { //Putendintodict Set<String>dictionary=newHashSet<>..
分类:其他好文   时间:2015-01-07 19:08:18    阅读次数:91
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!