自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 LeetCode--111. Minimum Depth of Binary Tree

111. Minimum Depth of Binary TreeDescription:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to

2018-01-12 15:50:16 171

原创 第八章习题8.3

Description:8.3 STINGY SAT is the following problem: given a set of clauses (each a disjunction of literals) and an integer k, find a satisfying assignment in which at most k variables a tru

2018-01-12 15:27:29 257

原创 LeetCode--55. Jump Game

55. Jump GameDescription:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum j

2018-01-12 15:10:48 143

原创 LeetCode--63. Unique Paths II

63. Unique Paths IIDescription:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty

2018-01-10 22:40:37 136

原创 LeetCode--62. Unique Paths

62. Unique PathsDescription:A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any po

2018-01-10 22:23:26 103

原创 LeetCode--240. Search a 2D Matrix II

240. Search a 2D Matrix IIDescription:Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row a

2018-01-10 22:09:59 113

原创 LeetCode--123. Best Time to Buy and Sell Stock III

123. Best Time to Buy and Sell Stock IIIDescription:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profi

2018-01-10 21:57:39 197

原创 LeetCode--121. Best Time to Buy and Sell Stock

121. Best Time to Buy and Sell StockDescription:Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one

2018-01-10 21:41:39 122

原创 LeetCode--455. Assign Cookies

455. Assign CookiesDescription:Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor

2017-11-30 11:23:55 158

原创 LeetCode--122. Best Time to Buy and Sell Stock II

Best Time to Buy and Sell Stock IIDescription:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You m

2017-11-30 10:42:40 134

原创 LeetCode--324. Wiggle Sort II

Wiggle Sort IIDescriptionGiven an unsorted array nums, reorder it such that nums[0] nums[2] .Example:(1) Given nums = [1, 5, 1, 1, 6, 4], one possible answer is [1, 4, 1, 5, 1, 6]

2017-11-02 11:08:26 219

原创 LeetCode--349. Intersection of Two Arrays

349. Intersection of Two ArraysDescription:Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Not

2017-11-02 10:23:23 183

原创 LeetCode--350. Intersection of Two Arrays II

350. Intersection of Two Arrays IIDescriptionGiven two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].

2017-10-29 20:28:52 171

原创 LeetCode--406. Queue Reconstruction by Height

LeetCode--406. Queue Reconstruction by HeightDescription:Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the h

2017-10-22 21:29:18 172

原创 LeetCode---513. Find Bottom Left Tree Value(DFS)

Find Bottom Left Tree Value(Depth-first-search)Given a binary tree, find the leftmost value in the last row of the treeExample 1: Input: 2 / \ 1 3 Output: 1Example 2: Input: 1 / \ 2

2017-09-24 17:50:50 143

原创 LeetCode--169. Majority Element (Divide-and-Conquer)

分治算法Majority Element

2017-09-10 18:47:17 270

空空如也

空空如也

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

TA关注的人

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