登录
|
注册
公司
标签
文章
搜索
字符串
热门公司
百度
微软
腾讯
华为
阿里巴巴
迅雷
热门职位
C语言工程师
研发工程师
测试工程师
所有
有回答
没回答
新题目
有最佳答案
排序
热度
·
时间
·
经典指数
1
0
1333
一个文本字符串由大小写字母,空格,',' '.'组成,求这个文本中完整句子的个数,一个完整的句子以'.'号结尾并至少包含一个字母(完整代码) ...
阅读题目
百度
字符串
问答题
经典指数
1
0
1134
The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1is read off as"one 1"or11. 11is read off as"two 1s"or21. 21is read off as"one 2, thenone 1"or1211. Given an integer n, generate the nth sequence. Note: The sequence of integers will be represented as a string. ...
阅读题目
字符串
面试题
经典指数
1
0
969
Implement regular expression matching with support for'.'and'*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). The function prototype should be: bool isMatch(const char *s, const char *p) Some examples: isMatch("aa","a") → false isMatch("aa","aa") → true isMatch("aaa","aa") → false isMatch("aa", "a*") → true isMatch("aa", ".*") → true isMatch("ab", ".*") → true isMatch("aab", "c*a*b") → tr ...
阅读题目
字符串
面试题
经典指数
1
0
3118
给定一个包含大小写字母,数字,运算符的字符串,要求设计一次遍历,空间复杂度为o(1) 的算法,使得大写字母在一起,小写字母在一起,数字在一起,运算符在一起。 ...
阅读题目
2015
人人网
研发工程师
字符串
问答题
经典指数
1
0
4912
请找出下面代码中的所有错误。说明:以下代码是把一个字符串倒序,如“abcd”倒序后变为“dcba”。 1 #include "string.h" 2 int main() 3 { 4 char *src = "hello,world"; 5 char *dest = NULL; 6 int len = strlen(src); 7 dest = (char *)malloc(len); 8 char *d = dest; 9 char *s = src[len]; 10 while (len-- != 0) 11 d++ = s--; 12 printf("%s", dest); 13 return 0; 14 15} 第7行要为'\0'分配一个空间 第9行改成char * s = &src[len-1] 第12行前要加上*d = 0; 第13行前要加上free(dest)释放空间 ...
阅读题目
腾讯
C语言工程师
字符串
多选题
经典指数
0
0
1631
将一个句子按单词反序。比如 "hi baidu com mianshiti",反序后变为 "mianshiti com baidu hi"。 ...
阅读题目
微软
字符串
问答题
经典指数
1
0
1150
将一个字符串转换成一个整数,要求不能使用字符串转换整数的库函数。 ...
阅读题目
字符串
面试题
经典指数
1
0
2026
序列 seq=[a,b,…,z,aa,ab,…,az,ba,bb,…,bz,…,za,zb,…,zz,aaa,…]类似于excel的字母序排列,任意给一字符串 s=[a-z]+(由a-z字符串组成的任意长度字符串),请问s是序列seq的第几个字符串。 ...
阅读题目
百度
字符串
查找
问答题
经典指数
1
0
3158
请编写能直接实现strstr()函数功能的代码。 ...
阅读题目
微软
C语言工程师
字符串
问答题
经典指数
1
0
2861
现有一个字典,同时给定字典中的两个字符串s和t,给定一个变换,每次可以改变字符串中的任意一个字符,请设计一个算法,计算由s变换到t所需的最少步数,同时需要满足在变换过程中的每个串都是字典中的串。 给定一个string数组dic,同时给定数组大小n,串s和串t,请返回由s到t变换所需的最少步数。若无法变换到t则返回-1。保证字符串长度均小于等于10,且字典中字符串数量小于等于500。 测试样例: ["abc","adc","bdc","aaa”],4,”abc","bdc" 返回:2 ...
阅读题目
字符串
队列
面试题
经典指数
<<
<
1
2
3
4
5
6
>
>>
242
题目数
1
贡献者
212
答案数
扫描后移动端查看
我也分享一个题目
相关标签
C语言工程师
百度
查找
复杂度
研发工程师
动态规划
微软
基础知识
腾讯
华为
同类标签
树
排序
数组
链表
复杂度
查找
栈
图
哈希
队列
微信公众号
欢迎加入,一起群聊
×
登录
注册
找回密码
记住登录
登录
快速注册
直接第三方登录