t617的博客

on the way

算法概论8.16

考虑怎么把一个3SAT实例转化成一个EXPERIMENTAL CUISINE 问题。 对于任意一个3SAT问题。若其某一子句cc为(U∪V∪W)(U∪V∪W)我们可以相应地建立7种ingredients,分别为: {UV¯¯¯Wc¯¯¯¯¯,U¯¯¯VWc¯¯¯¯¯,U¯¯¯V¯¯¯Wc,UV...

2018-01-01 16:54:53

阅读数 140

评论数 0

455. Assign Cookies

455. Assign Cookies题目 Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one coo...

2018-01-01 13:54:56

阅读数 156

评论数 0

322. Coin Change

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 co...

2017-12-12 20:41:32

阅读数 102

评论数 0

474. Ones and Zeroes

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, s...

2017-12-06 13:58:30

阅读数 152

评论数 0

53. Maximum Subarray

53. Maximum Subarray题目描述 Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example,...

2017-11-15 20:41:47

阅读数 122

评论数 0

198. House Robber

198. House Robber题目描述 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the on...

2017-11-03 12:22:11

阅读数 155

评论数 0

Queue Reconstruction by Height

406. Queue Reconstruction by Height题目描述 Suppose you have a random list of people standing in a queue. Each person is described by a pair of integer...

2017-10-17 12:59:23

阅读数 135

评论数 0

98. Validate Binary Search Tree

98. Validate Binary Search Tree题目描述 Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows...

2017-09-23 17:31:05

阅读数 148

评论数 0

167. Two Sum II - Input array is sorted

167. Two Sum II - Input array is sortedTwo Sum II - Input array is sorted 题目描述 解题思路题目描述 Given an array of integers that is already sorted in ascend...

2017-09-17 11:42:48

阅读数 203

评论数 0

55. Jump Game

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 ar...

2017-09-09 15:09:12

阅读数 165

评论数 0

240. Search a 2D Matrix II

240. Search a 2D Matrix II 题目描述 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties...

2017-09-09 14:13:41

阅读数 179

评论数 0

53. Maximum Subarray

Maximum Subarray Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the ar...

2017-09-09 12:05:06

阅读数 183

评论数 0

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