随笔分类 -  string

摘要:Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 22; return 1.Example2: version1==”11.22.33”,... 阅读全文
posted @ 2017-11-17 22:28 wangyaning 阅读(195) 评论(0) 推荐(0)
摘要:The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fix... 阅读全文
posted @ 2017-11-17 22:27 wangyaning 阅读(178) 评论(0) 推荐(0)
摘要:Write a function to find the longest common prefix string amongst an array of strings.我的解决方案:class Solution {public: string longestCommonPrefix(vec... 阅读全文
posted @ 2017-11-17 22:27 wangyaning 阅读(217) 评论(0) 推荐(0)
摘要:Given a string containing just the characters '(', ')', '{', '}', '[' and']', determine if the input string is valid.The brackets must close in the co... 阅读全文
posted @ 2017-11-17 22:27 wangyaning 阅读(125) 评论(0) 推荐(0)