自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 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 310

原创 C++ 版 Longest Common Prefix leetcode提交正确。

题目: Write a function to find the longest common prefix string amongst an array of strings 思路:本题是找到字符串的最长公共前缀。把第一个字符串给pre.           比较pre与下一个字符串的字符。如此得出这2个字符串的最长公共前缀,赋给str,再拿str作为新的字符串和数组中的下一个字符串比较

2015-04-23 14:51:25 341 1

原创 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 639

原创 Path Sum leetcode C++

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below binary tree and sum

2015-04-21 16:19:18 301 2

原创 Path Sum II C++ 实现 解题 LEETCODE

Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example: Given the below binary tree and sum = 22, 5 / \

2015-04-21 16:15:14 293

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除