自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 课后练习8.3证明

题目描述: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 are true, if su

2017-06-12 00:47:11 221

原创 算法课第18周第1题——55. Jump Game

题目描述: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 position.

2017-06-25 22:18:27 247

原创 算法课第17周第1题——133. Clone Graph

题目描述:Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled uniquely.We use # as a separat

2017-06-18 20:43:16 231

原创 算法课第16周第1题—— 215. Kth Largest Element in an Array

题目描述:Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,Given [3,2,1,5,6,4] and k = 2,

2017-06-11 22:56:16 470

原创 算法课第15周第1题—— 416. Partition Equal Subset Sum

题目描述:Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.Note:Each o

2017-06-04 20:59:14 217

原创 算法课第14周第1题——322. Coin Change

题目描述:You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amoun

2017-05-28 21:24:50 194

原创 算法课第13周第1题——486. Predict the Winner

题目描述:Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and then player 1 and so on. Each time a pla

2017-05-21 17:03:38 301

原创 算法课第12周第2题——63. Unique Paths II

题目描述: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 space is marked as 1 and 0 respectivel

2017-05-14 22:03:54 199

原创 算法课第12周第1题——62. Unique Paths

题目描述: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 point in time. The robot is trying to

2017-05-14 21:26:11 185

原创 算法课第11周第1题——120. Triangle

题目描述:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2],

2017-05-07 20:31:16 261

原创 算法课第10周第3题——91. Decode Ways

题目描述:A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine t

2017-04-30 01:30:58 208

原创 算法课第10周第2题——53. Maximum Subarray

题目描述:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray [4

2017-04-30 00:59:23 223

原创 算法课第10周第1题——70. Climbing Stairs

题目描述:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n wil

2017-04-26 16:02:03 225

原创 算法课第9周第1题——474. Ones and Zeroes

题目描述:In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue.For now, suppose you are a dominator of m 0s and n 1s respectively.

2017-04-23 17:17:04 269

原创 算法课第8周第1题——494. Target Sum

题目描述:You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol.

2017-04-16 20:59:52 231

原创 算法课第7周第1题——516. Longest Palindromic Subsequence

题目描述:Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000.Example 1:Input:"bbbab"Output:4One possible lon

2017-04-09 17:18:18 166

原创 算法课第6周第1题——402. Remove K Digits

题目描述:Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible.Note:The length of num is less than 10002

2017-04-02 21:47:18 277

原创 算法课第5周第1题——452. Minimum Number of Arrows to Burst Balloons

题目描述:There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the horizontal diameter. Since it's horizontal

2017-03-26 18:37:37 230

原创 算法课第4周第1题——417. Pacific Atlantic Water Flow

题目描述:Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top edges of the matrix and the "Atlantic

2017-03-19 21:30:59 278

原创 算法课第3周第2题——207. Course Schedule

题目描述:There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is ex

2017-03-12 03:56:23 340

原创 算法课第3周第1题——113. Path Sum II

题目描述: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

2017-03-11 15:46:12 294

原创 算法课第2周第2题——241. Different Ways to Add Parentheses

题目描述:Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *.Ex

2017-03-04 16:24:31 212

原创 算法课第2周第1题——100. Same Tree

题目描述:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.

2017-02-28 01:05:06 242

原创 算法课第1周第3题——38. Count and Say

题目描述:The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is r

2017-02-27 04:36:00 311

原创 算法课第1周第2题——10. Regular Expression Matching

题目描述:Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the enti

2017-02-27 03:45:09 214

原创 算法课第1周第1题——20. Valid Parentheses

题目描述:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" a

2017-02-24 23:36:46 247

空空如也

空空如也

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

TA关注的人

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