- 博客(3)
- 收藏
- 关注
c库函数的简单实现
1.最经典的atoi 实际用dev c++测了下,库atoi的输出: char *str1="/0"; char *str2="123422"; char *str3="-332"; char *str4="233333333333"; char *str5="123adb23"; char *str6="0"; char *str7="+2313";
2014-05-15 16:24:00
121
和字符串相关的一些问题
1.求最大公共子序列(LCS) 给定两个字符串,求它们的公共子序列,不要求字符是连续的。 例如:str1=”abcdefg“,str2="abdfkx"。则LCS为”abdf“,长度为4。一般来说,序列可能有多个,但是长度是相同的。 思路:动态规划 c[i][j]=c[i-1][j-1]+1 , 如果str1[i-1]=str2[j-1]; c[i][j]=max{c[i-1][j],c...
2014-05-15 13:18:00
110
C++ sizeof 使用规则及陷阱分析
1、什么是sizeof 首先看一下sizeof在msdn上的定义: The sizeof keyword gives the amount of storage, in bytes, associated with a variable or a type (including aggregate types). This keyword returns a value of type s...
2014-04-20 21:59:00
100
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人