我奶奶都会 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ int i; char a[300]; gets(a)…… 题解列表 2023年06月18日 0 点赞 0 评论 1120 浏览 评分:9.9
1206: 字符串问题 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char str[1001]; scanf("%[^\n]",str);…… 题解列表 2023年03月28日 0 点赞 0 评论 529 浏览 评分:9.9
Kanna-字符串问题--C++ C++在实现字符串逆序时可以使用string头文件中的函数#include#includeusingnamespacestd;intmain(){stringstr;cin>>str;strings(str.rbegin(),str.rend());cout 题解列表 2020年01月15日 0 点赞 0 评论 1459 浏览 评分:9.9
优质题解 多种方法实现字符串逆序-想用指针的看过来 摘要:#### 题目描述 给定一个字符串s,将s中的字符顺序颠倒过来,比如s="abcd",逆序后变成s="dcba"。| ------------ ##### 方法一:普通逆序 …… 题解列表 2019年06月28日 1 点赞 4 评论 3024 浏览 评分:9.9
Manchester-【字符串问题】 ###解题思路:1.法一:输入一个字符串,求其长度,然后从最后一个字符一次向前输出1.法二:把字符串存入栈,然后把栈中元素pop出来1.以上两种方法本质上一样,这里采用第二种方法,回顾栈知识```c#include#include//定义一个字符栈typedefstructStack_{charA[2 题解列表 2020年03月13日 0 点赞 0 评论 1971 浏览 评分:9.9
字符串问题-题解(C++和python代码) c++用了string类和algorithm#include#include#includeusingnamespacestd;intmain(){stringa;cin>>a;reverse(a.begin(),a.end());cout 题解列表 2019年06月16日 0 点赞 0 评论 1381 浏览 评分:9.9
1206: 字符串问题 ```cpp#include#includeusingnamespacestd;intmain(){chara[300];gets(a);for(inti=strlen(a)-1;i>=0;i--)putchar(a[i]);return0;}``` 题解列表 2023年01月05日 0 点赞 0 评论 567 浏览 评分:9.9
字符串问题(c语言递归) ```c#include#includevoidswap(char*s1,char*s2);voidreverse(char*strs,intleft,intright);intmain(){charstrs[256]={0};gets(strs);reverse(strs, 题解列表 2023年04月29日 1 点赞 0 评论 881 浏览 评分:9.9
字符串问题-题解(C++代码) reverse -- 又一个实用小技巧 题目描述字符串处理在计算机中有很多复杂的操作,但是这些复杂的操作都是由基本的字符串操作复合而成,要求编写一字符串颠倒的程序,把字符串中的字符颠倒位置。------------输入输入一字符串(>s;reverse(s.begin(),s.end());//这个函数没有返回值不能直接输出cout 题解列表 2020年05月18日 0 点赞 0 评论 1630 浏览 评分:9.9
字符串问题 java双指针原地逆序O(n)复杂度 摘要:import java.util.Scanner; public class Main { //时间复杂度 O(n) public static void main(Stri…… 题解列表 2022年07月04日 0 点赞 0 评论 556 浏览 评分:9.9