码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
[LeetCode] Palindrome Partition [11]
题目:Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. 解题思路: 回文划分,题目意思是给一个字符串,找出将字符串划分为一系列回文子串的各种可能组合。例如,一个子串“aab“,你需要返回["aa","b"],["a","a","b"]。这个题目的解法也是非常的典型---循环加递归,...
分类:其他好文   时间:2014-06-09 23:24:11    阅读次数:256
java编写输入一个数判断是否是回文数,所谓回文数比如121,1221,6778776
package com.hao947; import java.util.Scanner; public class demo5 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int x = 0; x = scanner.nextInt(); Syste...
分类:编程语言   时间:2014-06-08 17:25:54    阅读次数:291
leetcode——Longest Substring Without Repeating Characters 求链表中无重复字符的最大字串长度(AC)
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo...
分类:其他好文   时间:2014-06-08 16:27:47    阅读次数:231
普林斯顿公开课 算法3-9:Comparator比较器
在前几个章节中使用了Comparable作为比较函数。比如对于字符串,就是按字母表的顺序进行排序。有时候想要换一种比较方式,该怎么实现呢? 在Java中可以使用Comparator比较器,以下代码展示了字符串之间不同的比较方式。 String[] a; ... Arrays.sort(); ... Arrays.sort(a, String.CASE_INSENSITI...
分类:其他好文   时间:2014-06-08 15:37:08    阅读次数:201
Decode Ways
题目 A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine ...
分类:其他好文   时间:2014-06-08 15:30:08    阅读次数:182
WebClient Post 数据 ,支持Cookie
WebClient web = new CookieWebClient(); web.Encoding = Encoding.UTF8; string regUrl = "http://test.com"; web.Headers.Add("Content-Type", "application/x-www-form-urlencoded"); byte[] post = Encoding.UTF...
分类:Web程序   时间:2014-06-08 10:50:57    阅读次数:324
Restore IP Addresses
题目 Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "25525511135", return ["255.255.11.135", "255.255.111.3...
分类:其他好文   时间:2014-06-08 10:37:47    阅读次数:273
C#开发笔记-读取文件,并将文件使用分隔符隔开
//读取报告数据 string data=null; using (System.IO.StreamReader sr = new System.IO.StreamReader(filePath, System.Text.Encoding.Default)) { ...
分类:其他好文   时间:2014-06-08 08:27:59    阅读次数:236
NSMutableDictionary 类中增加键值对方法分析
在iOS中可变字典增加一个键值对的方法有setObject: forKey: 和setValue : forKey: .为了方便我们把这两个方法简称为方法A和方法B。B这个方法中其中的value值是不能为nil,否则程序会出项崩溃。而A方法中的这个value可以为nil,但是当这个value位nil...
分类:其他好文   时间:2014-06-07 21:24:08    阅读次数:241
选定的数据存储区出现问题,原因可能是服务器名称或凭据无效,或者权限不足
问题: ASP.NET Configuration site->安全,报错“选定的数据存储区出现问题,原因可能是服务器名称或凭据无效,或者权限不足”解决:打开文件C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config找到...
分类:其他好文   时间:2014-06-07 21:14:32    阅读次数:279
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!