![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode笔记
fangwanting
这个作者很懒,什么都没留下…
展开
-
LeetCode:Valid Parentheses
题目:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are原创 2017-10-07 10:55:42 · 83 阅读 · 0 评论 -
LeetCode : two Sum
问题: Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use原创 2017-10-03 15:57:20 · 104 阅读 · 0 评论 -
LeetCode:Reverse Integer
题目:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321The input is assumed to be a 32-bit signed integer. Your function should return 0 when the原创 2017-10-03 16:17:03 · 146 阅读 · 0 评论 -
LeetCode:Palindrome Number
题目:Determine whether an integer is a palindrome. Do this without extra space.(就是一个数字如果反着读和顺着读是一样的,那就是palindrome)我用到的方法就是用上一篇文章reverse number提到的方法,把这个数反过来,如果反过来的数与原数相等,那么这个数就是palindrome。不过首先判断是不是负数,负原创 2017-10-03 16:26:35 · 106 阅读 · 0 评论 -
LeetCode: Longest Common Prefix
题目:Write a function to find the longest common prefix string amongst an array of strings.For example:{"a","a","b"} should give "" as there is nothing common in all the 3 strings.{"a",原创 2017-10-04 21:12:43 · 101 阅读 · 0 评论 -
LeetCode: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"原创 2017-10-11 22:24:13 · 95 阅读 · 0 评论