
leetcode
emmmxuan
唯手熟尔
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
1.Two Sum
class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ length=len(nums) ...原创 2018-10-24 19:28:05 · 114 阅读 · 0 评论 -
7. Reverse Integer
""" Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 Note: Assume we are dealing...原创 2018-10-24 19:32:39 · 119 阅读 · 0 评论 -
9. Palindrome Number
""" Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 Output: false Exp...原创 2018-10-24 19:35:49 · 116 阅读 · 0 评论 -
13. Roman to Integer
""" Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D ...原创 2018-10-24 19:39:41 · 185 阅读 · 0 评论 -
14. Longest Common Prefix
""" Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Example 1: Input: ["flower","flow","flight"] Out.原创 2018-10-24 19:41:30 · 132 阅读 · 0 评论 -
20. Valid Parentheses
""" Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type...原创 2018-10-24 19:43:12 · 135 阅读 · 0 评论