自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 第八章8.8证明EXACT 4ST问题为NP-complete

8.8 In the EXACT 4SAT problem, the input is a set of clauses, each of which is a disjunction of exactly four literals, and such that each variable occurs at most once in each clause. The goal is t

2017-01-08 11:54:09 313

原创 (Leetcode)53. Maximum Subarray(medium)

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,-1,2,1] has

2016-11-03 16:49:56 224

原创 (Leetcode)64. Minimum Path Sum(medium)

Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at an

2016-11-02 22:55:02 268

原创 (Leetcode)357. Count Numbers with Unique Digits (medium)

Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example: Given n = 2, return 91. (The answer should be the total numbers in the range of 0 ≤ x < 100, exclu

2016-10-27 00:08:48 284

原创 (Leetcode)377. Combination Sum IV (medium)

Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. Example: nums = [1, 2, 3] target = 4The possib

2016-10-26 23:24:03 252

原创 (Leetcode)72. Edit Distance(hard)

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on a word:

2016-10-20 23:13:49 285

原创 (Leetcode)62.Unique Paths(medium)

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 reach the bot

2016-10-12 22:59:21 256

原创 (Leetcode)70.Climbing Stairs(easy)

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? 这题是比较典型的递归的问题,记得当初初次接触递归的时候就

2016-10-12 22:44:39 214

原创 (Leetcode)10.Regular Expression Matching(hard)

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 entire input stri

2016-10-09 20:29:25 312

原创 (Leetcode)215.Kth Largest Element in an Array(medium)

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, return 5.

2016-09-12 23:33:07 206

原创 (Leetcode)5. Longest Palindromic Substring(medium)

Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.       这个问题是求一个字符串里面最长的回文子串

2016-09-12 15:55:43 313

原创 Longest Substring Without Repeating Characters(medium)

Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcbb”, the answer is “abc”, which the length is 3. Given “bbbbb”, the answer is “b”, with

2016-09-07 23:01:37 401

原创 Median of Two Sorted Arrays(hard)

There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).我的解答:class Solution {public:

2016-09-06 22:52:44 280

原创 Add Two Numbers(medium)

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link

2016-09-04 15:36:45 294

原创 Two Sum(easy)

Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution.Example:Given nums = [2,

2016-09-04 10:13:16 204

空空如也

空空如也

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

TA关注的人

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