登录
|
注册
公司
标签
文章
搜索
字符串
热门公司
百度
微软
腾讯
华为
阿里巴巴
迅雷
热门职位
C语言工程师
研发工程师
测试工程师
所有
有回答
没回答
新题目
有最佳答案
排序
热度
·
时间
·
经典指数
1
0
1998
请实现一个函数,将一个字符串中的空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy。 ...
阅读题目
字符串
面试题
经典指数
1
1
2509
删除字符串中所有给定的子串问题描述:在给定字符串中查找所有特定子串并删除,如果没有找到相应子串,则不作任何操作。 要求实现函数: int delete_sub_str(const char *str, const char *sub_str, char *result_str) 【输入】 str:输入的被操作字符串 sub_str:需要查找并删除的特定子字符串 【输出】 result_str:在str字符串中删除所有 sub_str子字符串后的结果 【返回】 删除的子字符串的个数 ...
阅读题目
字符串
华为
问答题
经典指数
0
0
2006
Given a string with n characters, suppose all the characters are different from each other, how many different substrings do we have? n+1 n^2 n(n+1)/2 2^n-1 n! ...
阅读题目
微软
字符串
组合数学
单选题
经典指数
1
0
1138
设计一个strmncmp函数,对比普通的strcmp,原则在于,当字符串中含有数字时,以数字大小为标准,对于其中只有一个字符串为数字的情况,仍然使用原来的原则,要求:请给出完整代码,在达到目标的情况下尽量搞笑,简洁。 ...
阅读题目
百度
字符串
问答题
经典指数
0
0
2352
把字符串转换为整数 例如:"-123" -> -123 #include #include using namespace std; int num(string str) { int num = 0; for (int i = 0; i < ___1___; i ++) { int k = ___2__; num = __3___; } return num; } int main() { string str = "-123"; int n = 0; if ( str[0] == '-' ) n = -1 * num (str.substr(1)); else n = num(str); cout ...
阅读题目
腾讯
C语言工程师
字符串
问答题
经典指数
0
0
2250
检查程序,是否存在问题,如果存在指出问题所在,如果不存在,说明输出结果。 package algorithms.com.guan.javajicu; public class Example { String str = new String(“good”); char[] ch = {‘a’, ’b’, ’c’}; public static void main(String[] args) { Exampleex = new Example(); ex.change(ex.str, ex.ch); System.out.print(ex.str + ” and ”); System.out.print(ex.ch); } public void change(Stringstr, char ch[]) { str = “test ok”; ch[0] = 'g'; } } ...
阅读题目
Java
网易
2015
字符串
问答题
经典指数
1
0
895
Given an absolute path for a file (Unix-style), simplify it. For example, path ="/home/", =>"/home" path ="/a/./b/../../c/", =>"/c" click to show corner cases. Corner Cases: Did you consider the case where path ="/../"? In this case, you should return"/". Another corner case is the path might contain multiple slashes'/'together, such as"/home//foo/". In this case, you should ignore redundant slashes and return"/home/foo". ...
阅读题目
字符串
面试题
经典指数
1
0
2048
字符串“abc,def,jpk”与字符串“jpk,def,abc”,字符串是用英文状态下逗号进行分割,如上例中,那么两个字符串是相等的,用代码实现符合上例中规则的两个字符串判断是否相等。 ...
阅读题目
百度
字符串
问答题
经典指数
1
0
2145
字符串A和字符串B,请将A中在B中存在的字符删除,比如A="This is the world",B="abcdefghi",则返回A为"Ts s t worl" ...
阅读题目
小米
字符串
问答题
经典指数
1
0
1843
请按注释的说明,用C语言实现以下函数的功能。 /*Name:replace Function:to replace substring s1 in string source with substring s2 Parameters:source,string supposed to hold substring s1,substring to be replaced s2,substring to replace substring s1 flag,case-sensitive flag, 1,case-sensitive 0,non-case-sensitive Return values: number of substrings haved been replaced*/ (Supplementary:To be not complicated,assume that the length of the string after replaced is not greater than 1024 bytes.) ...
阅读题目
C语言工程师
字符串
问答题
经典指数
<<
<
5
6
7
8
9
10
>
>>
242
题目数
1
贡献者
212
答案数
扫描后移动端查看
我也分享一个题目
相关标签
C语言工程师
百度
查找
复杂度
研发工程师
动态规划
微软
基础知识
腾讯
华为
同类标签
树
排序
数组
链表
复杂度
查找
栈
图
哈希
队列
微信公众号
欢迎加入,一起群聊
×
登录
注册
找回密码
记住登录
登录
快速注册
直接第三方登录