码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
Leetcode# 71 Simplify Path
原题地址用栈保存化简后的路径。把原始路径根据"/"切分成若干小段,然后依次遍历若当前小段是"..",弹栈若当前小段是".",什么也不做否则,入栈代码: 1 string simplifyPath(string path) { 2 vector buffer; 3 char *tok = NU...
分类:其他好文   时间:2015-01-25 18:09:35    阅读次数:138
NSString的内存管理问题 (转载)
NSString是一个不可变的字符串对象。这不是表示这个对象声明的变量的值不可变,而是表示它初始化以后,你不能改变该变量所分配的内存中的值,但你可以重新分配该变量所处的内存空间。生成一个NSString类型的字符串有三种方法:方法1.直接赋值: NSString*str1 =@"my string"...
分类:其他好文   时间:2015-01-25 18:06:09    阅读次数:128
JavaScript字符串技巧
1.使用逗号分割金额String.prototype.strReverse = function() { return this.split('').reverse().join('');}function amountSplit(amount) { return amount.toSt...
分类:编程语言   时间:2015-01-25 17:54:28    阅读次数:142
SQL2008生成连接字符串
private static string connStr { get { SqlConnectionStringBuilder sb = new SqlConnectionStringBuilder(); ...
分类:数据库   时间:2015-01-25 17:53:13    阅读次数:167
数据库的连接
private void button1_Click(object sender, EventArgs e) { //连接数据库 string sqls = "server=.;database=schoolData;user=sa;pwd=";//.本机的地址,数据库的文件名,sa:登录用户名 ....
分类:数据库   时间:2015-01-25 17:52:34    阅读次数:192
LeetCode | #20 Valid Parentheses
题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are...
分类:其他好文   时间:2015-01-25 16:44:04    阅读次数:136
[C++]LeetCode: 121 Palindrome Partitioning (分割回文子串 回溯法)
题目: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ...
分类:编程语言   时间:2015-01-25 16:41:55    阅读次数:201
java程序中的元素注意
1 public class HelloWorld{2 public static void main(String[] args) {3 System.out.println("Hello World!");//输出Hello World!4 }5 }publ...
分类:编程语言   时间:2015-01-25 16:24:14    阅读次数:200
uva729
/*题目一大堆,其实意思就是长度为n个二进制数,里面有h个1,将这个二进制数进行全排列,然后输出*/#include"iostream"#include"algorithm"#include"stdio.h"#include"string.h"#include"cmath"#include"queu...
分类:其他好文   时间:2015-01-25 15:09:52    阅读次数:156
HDU1198
这道题DFS,BFS,并查集好像都可以觉得深搜跟并查集可能会更简单一些 1 #include "iostream" 2 #include "algorithm" 3 #include "memory.h" 4 #include "cmath" 5 #include "string" 6 using ...
分类:其他好文   时间:2015-01-25 15:05:19    阅读次数:192
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!