码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
LeetCode之“动态规划”:Longest Valid Parentheses
题目链接 题目要求: Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring. For...
分类:其他好文   时间:2015-06-12 23:52:34    阅读次数:120
ZigZag Conversion
1. Question给定行数,将某字符串转换为zigzag形式,然后按行输出。zigzag形式如:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you...
分类:其他好文   时间:2015-06-12 23:52:02    阅读次数:245
Longest Palindromic Substring
1. Question求最长回文子串Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists...
分类:其他好文   时间:2015-06-12 23:49:08    阅读次数:228
解决Git无法同步空文件夹的问题
思路:在每个空文件夹下创建空文件,同步后再删除 1 protected static Logger logger = Logger.getLogger(CreateFileInEmptyDir.class); 2 3 private static final String crea...
分类:其他好文   时间:2015-06-12 23:43:00    阅读次数:158
[NCH 1]
Preview:1.Implement strStr()O(m*n): 1 class Solution 2 { 3 public: 4 int strStr(string haystack,string needle) 5 { 6 for(int i=0;i<=in...
分类:其他好文   时间:2015-06-12 23:42:00    阅读次数:127
Java 正则表达式(三)
上面讲了一些Java正则表达式的一些容易混淆的地方,接下来还有几个实例跟大家分享一下字符串切割demo1Stringstr="zhangsan,lisi,wangwu"; Stringreg=",";//注意这里可能会容易出错,当然这个demo可以直接写‘,‘ String[]arr=str.split(reg);demo2Stringstr="zhangsanlisiwangwu";..
分类:编程语言   时间:2015-06-12 22:33:35    阅读次数:218
C# 值类型互相转换小结
一:隐式转换:自动类型转换二:显式转换:强制类型转换doublea=12.2; intb=10; intc=(int)a+b;三:使用Parse()方法进行转换1数值型转换为字符型intnum1=10 stringmynum=num1.ToString();//把num1转换成string类别后赋值给mynum变量2、字符串数据转换为数值型使用Pares()1)、..
分类:Windows程序   时间:2015-06-12 22:28:38    阅读次数:276
java分页数据导出excel
/** * 订单导出(用于统计利润) * @return */ public String orderExport() throws IOException{ if (queryOrderList_currentPage == null || queryOrderList_currentPage <= 0) { queryOrderList_currentPage = 1;...
分类:编程语言   时间:2015-06-12 22:19:50    阅读次数:180
[LeetCode] Longest Substring with At Most Two Distinct Characters
Problem Description:Given a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s =“eceb...
分类:其他好文   时间:2015-06-12 22:04:43    阅读次数:103
A星算法入门之入ing...
几天以来的瞎折腾,能算入门么? 漫漫几千里,A星算法这么走。 测试程序: public class AStarTest { ? ? /** ? ? ?* @param args ? ? ?*/ ? ? public static void main(String[] args) { ? ? ? ? ...
分类:编程语言   时间:2015-06-12 20:58:27    阅读次数:137
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!