自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 [LeetCode] [C++] 62. Unique Paths

There are numbers in each grid in the picture, which stand for the number of unique paths from Start to the grid. Observing the picture, we can easily find that, for any i,j>0, dp[i][j]=dp[i-

2017-12-09 14:00:58 156

原创 [LeetCode] [C] 48. Rotate Image

Looking at the input matrix and the output matrix, we can easily find that it rotates  90°  clockwise. And I implement that by rotating every "circle" of it. First I rotate the outmost circle,

2017-11-28 16:15:32 177

原创 [LeetCode] [C++] 20. Valid Parentheses

I used the data structure "Stack" here, which is convenient to solve this problem. When the parenthesis is a left parenthesis, I push it into the stack. And when the parenthesis is a right par

2017-11-22 21:47:50 157

原创 [LeetCode] [C] 41. First Missing Positive

In this program, I used Bubble Sort to sort the array first. Then, I declared a variable "count" to represent the First Missing Positive Integer. (Because the way I used it is similar to when I am

2017-11-21 23:44:39 174

原创 [LeetCode] [C] 100. Same Tree

To solve the problem about Binary Tree, I still used Recursive Method. Here, I still wrote another function to help traverse. And I still declared the variable outside the two functions. S

2017-11-21 22:59:42 235

原创 [LeetCode] [C] 104. Maximum Depth of Binary Tree

Talking about Binary Tree, I will often think of Recursion. To traverse the binary tree, I always use Recursive Method. So here, to find the maximum depth of binary tree, I wrote another fu

2017-11-21 22:44:31 220

原创 [LeetCode] [C++] 515. Find Largest Value in Each Tree Row

When seeing this problem, which let us find something in each tree row, I thought I could solve this problem by using "Level-order Traversal". The code is as follows. The Runti

2017-11-21 22:31:04 169

空空如也

空空如也

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

TA关注的人

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