摘要:
1 """ 2 先用dict存储罗马数字对应的阿拉伯数字, 3 IV可划分为I,V,比较相邻字符的大小进行加减操作 4 """ 5 class Solution: 6 def romanToInt(self, s): 7 if s == None: #讨论边界情况 8 return 0 9 sum 阅读全文
摘要:
1 """ 2 Write a function to find the longest common prefix string amongst an array of strings. 3 If there is no common prefix, return an empty string 阅读全文
摘要:
1 """ 2 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. 3 An input string is va 阅读全文
摘要:
1 """ 2 Given a string s and a string t, check if s is subsequence of t. 3 You may assume that there is only lower case English letters in both s and 阅读全文