leetcode整理 Two Pointers
StudyCoder
这个作者很懒,什么都没留下…
展开
-
345. Reverse Vowels of a String
题目:Write a function that takes a string as input and reverse only the vowels of a string.Example 1:Given s = "hello", return "holle".Example 2:Given s = "leetcode", return "leotcede"转载 2016-06-28 13:33:13 · 204 阅读 · 0 评论 -
344. Reverse String
题目:Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".题意:写一个程序完成将输入的一个字符串反转之后返回;思路:定义两个下标le转载 2016-06-28 13:47:19 · 187 阅读 · 0 评论 -
28. Implement strStr()
题目:Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.题意:实现strStr()函数功能,用于判断字符串needle是否是haystack的子串。如果是,则该函数返回n转载 2016-06-28 14:32:46 · 278 阅读 · 0 评论 -
125. Valid Palindrome
题目:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car"转载 2016-06-28 15:28:23 · 178 阅读 · 0 评论