码迷,mamicode.com
首页 >  
搜索关键字:reverse_string    ( 307个结果
*LeetCode--Reverse String II (自己的做法很笨)
Reverse String II 自己的解法: 就是用一个StringBuffer来进行字符串的接收,利用一个指针来指示当前是哪一个k部分,当 i + k < s.length() 时,证明从 i 到 i + k - 1部分是可以进行反转的,而从i + k 部分到 i + 2 * k部分是直接进行 ...
分类:其他好文   时间:2018-05-19 18:42:37    阅读次数:181
LeetCode 344. Reverse String(反转字符串)
题目描述 + LeetCode "344. 反转字符串" + 请编写一个函数,其功能是将输入的字符串反转过来。 示例 + 输入: s = "hello" + 返回: "olleh" Code + Java class Solution { public String reverseString(St ...
分类:其他好文   时间:2018-05-05 10:19:22    阅读次数:140
LeetCode 541. Reverse String II
question: try: result: 22.58% conclusion: dm ...
分类:其他好文   时间:2018-05-01 13:53:30    阅读次数:130
LeetCode-Reverse Words in a String
Given an input string, reverse the string word by word. Example: Input: "the sky is blue", Output: "blue is sky the". Notes: A word is defined as a se ...
分类:其他好文   时间:2018-04-29 11:46:45    阅读次数:123
344 Reverse String 反转字符串
请编写一个函数,其功能是将输入的字符串反转过来。示例:输入:s = "hello"返回:"olleh"详见:https://leetcode.com/problems/reverse-string/description/C++: ...
分类:其他好文   时间:2018-04-15 11:51:13    阅读次数:101
344. Reverse String
原题链接: "https://leetcode.com/problems/reverse string/description/" 实现如下: Java / Created by clearbug on 2018/2/26. / public class Solution { public stat ...
分类:其他好文   时间:2018-04-09 13:19:50    阅读次数:116
CareerCup All in One 题目汇总
CareerCup All in One 题目汇总 Chapter 1. Arrays and Strings 1.1 Unique Characters of a String 1.2 Reverse String 1.3 Permutation String 1.4 Replace Spaces ...
分类:其他好文   时间:2018-04-04 20:45:40    阅读次数:191
344. Reverse String 最基础的反转字符串
[抄题]: [暴力解法]: 时间分析: 空间分析: [奇葩输出条件]: [奇葩corner case]: [思维问题]: 还停留在 i < len / 2的阶段,不行,应该是指针对撞问题了 [一句话思路]: 先要把字符串转成数组,再转回来,数据结构白学了? [输入量]:空: 正常情况:特大:特小:程 ...
分类:其他好文   时间:2018-03-18 11:53:54    阅读次数:144
[LeetCode] 186. Reverse Words in a String II 翻转字符串中的单词 II
Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.The input string does not contain lead ...
分类:其他好文   时间:2018-03-10 11:53:00    阅读次数:168
[LeetCode] 151. Reverse Words in a String 翻转字符串中的单词
Given an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky the". Update (2015-02-12):For C pr ...
分类:其他好文   时间:2018-03-10 11:46:31    阅读次数:140
307条   上一页 1 ... 3 4 5 6 7 ... 31 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!