摘要:
Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 思路:对应检查char是否一样,不一样直接跳出检 阅读全文
posted @ 2016-10-10 07:19
Machelsky
阅读(313)
评论(0)
推荐(0)
摘要:
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 阅读全文
posted @ 2016-10-10 07:04
Machelsky
阅读(144)
评论(0)
推荐(0)
摘要:
160. Intersection of Two Linked Lists 1.各自扫一遍list找到第一个相同节点 2.各自扫一遍,记录长度。将长的缩小到跟短的一样,相同长度的情况下找同节点。 136. Single Number: A^0=A A^A=0 最后留下A 阅读全文
posted @ 2016-10-10 06:55
Machelsky
阅读(84)
评论(0)
推荐(0)
摘要:
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan 阅读全文
posted @ 2016-10-10 06:24
Machelsky
阅读(105)
评论(0)
推荐(0)
摘要:
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
posted @ 2016-10-10 06:02
Machelsky
阅读(110)
评论(0)
推荐(0)
摘要:
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: 阅读全文
posted @ 2016-10-10 05:35
Machelsky
阅读(135)
评论(0)
推荐(0)