Leetcode
文章平均质量分 52
wayhk111111
这个作者很懒,什么都没留下…
展开
-
C语言版 Longest Common Prefix leetcode提交正确
题目:Write a function to find the longest common prefix string amongst an array of strings. 思路:本题就是找到字符串中最长的公共前缀。 把第一个字符串给prefix,与之后的字符串比较。得到新的prefix,再比较; 解题代码: char* longestCommonPrefix(c原创 2015-04-23 14:49:36 · 645 阅读 · 0 评论 -
Valid Parentheses C++ 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 o原创 2015-04-27 14:33:09 · 328 阅读 · 0 评论