自定义博客皮肤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习题解答:First Missing Positive

难度:Hard 描述: Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time

2017-12-30 00:03:03 434

原创 课后习题8.8

8.8.证明 Exact 4 SAT是一个NP完全问题。 通过把3sat reduce到4sat实现 首先设想有3SAT实例 f1 = (x1 ∨ x2 ∨ x3) ∧(x4 ∨ x5 ∨ x6) .......(xn ∨ xn+1 ∨ xn+2) 其中x1~xn+2都是不同的变量,现在我们加入一个新变量a 通过这个变量的加入,对f1中的子句进行变形: 例如对于第一个子句(x1 ∨ x2

2017-12-27 21:30:35 263

原创 leetcode习题解答:45. Jump Game II

难度:Hard 描述: 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 jump length at that positi

2017-12-21 23:42:00 243

原创 leetcode习题解答:39. Combination Sum

难度:Medium 描述: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeat

2017-12-16 15:38:13 156

原创 leetcode习题解答:37. Sudoku Solver

难度:Hard 描述: Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be only one unique solution.

2017-12-16 15:31:24 182

原创 leetcode习题解答:16. 3Sum Closest

难度:medium 描述: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each in

2017-12-09 01:09:24 122

原创 leetcode习题解答: 15. 3Sum

难度:medium Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set mus

2017-12-03 21:12:13 146

空空如也

空空如也

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

TA关注的人

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