自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Leetcode | Longest Increasing Subsequence

原题链接:https://leetcode.com/problems/longest-increasing-subsequence原题意大意是给定一个数字序列,相当于是一个数组,然后求出最长递增子序列的长度,这道题刚入手就可以大致确定解法思路,是利用DP动态规划来实现的,利用一个数组L(i)来存放当前以第i个数字结尾的最长子序列的长度,通过所有与i相连的j,L(i)= 1+max{L(j)},

2018-01-13 23:45:23 233

原创 Leetcode | Max Area of Island

原题链接:https://leetcode.com/problems/max-area-of-island原题意内容如下所示: Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) connected 4-directionally (horizon

2018-01-07 14:25:30 288

原创 算法概论课后题8.14

原题意如下所示: Prove that the following problem is NP-complete: given an undirected graph G = {V,E} and an integer k, return a clique of size k as well as an independent set of size k, provided both exis

2017-12-31 23:33:14 591

原创 Leetcode | K Inverse Pairs Array

原题链接:https://leetcode.com/problems/k-inverse-pairs-array题目内容如下: Given two integers n and k, find how many different arrays consist of numbers from 1 to n such that there are exactly k inverse pairs.

2017-12-23 17:37:44 262

原创 Leetcode | Delete and Earn

原题链接:https://leetcode.com/problems/delete-and-earn原题目如下所示: Given an array nums of integers, you can perform operations on the array. In each operation, you pick any nums[i] and delete it to e

2017-12-17 23:46:31 278

原创 Leetcode | Repeated String Match

原题链接:https://leetcode.com/problems/repeated-string-match题意内容如下所示: Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solutio

2017-12-10 20:11:57 273

原创 Leetcode | Edit Distance

原题链接:https://leetcode.com/problems/edit-distance原题目内容如下所示: 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.)

2017-12-04 00:00:27 200

原创 Leetcode | Number of Longest Increasing Subsequence

原题链接:https://leetcode.com/problems/number-of-longest-increasing-subsequence原题意内容如下: Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1: Input:

2017-11-26 22:02:17 310

原创 Leetcode | Integer Break

原题链接:https://leetcode.com/problems/integer-break原题目内容如下所示: Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the m

2017-11-19 23:56:50 230

原创 Leetcode | Partition to K Equal Sum Subsets

原题链接:https://leetcode.com/problems/partition-to-k-equal-sum-subsets原题意如下所示: Given an array of integers nums and a positive integer k, find whether it’s possible to divide this array into k non-empty

2017-11-12 23:02:12 291

原创 Leetcode | Maximum Length of Repeated Subarray

原题链接:https://leetcode.com/problems/maximum-length-of-repeated-subarray原题意如下所示: Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1:

2017-11-04 18:14:25 315

原创 Leetcode | Expression Add Operators

原题链接:https://leetcode.com/problems/expression-add-operators题目内容如下所示: Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -

2017-10-29 22:47:20 275

原创 Leetcode | Surrounded Regions

原题链接:https://leetcode.com/problems/surrounded-regions题目描述: Given a 2D board containing ‘X’ and ‘O’ (the letter O), capture all regions surrounded by ‘X’. A region is captured by flipping all ‘O’

2017-10-22 22:47:56 768

原创 Leetcode | Combination Sum

原题链接:https://leetcode.com/problems/combination-sum原题目描述如下所示: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate n

2017-10-12 17:35:06 337

原创 Leetcode | Regular Expression Matching

原题链接:https://leetcode.com/problems/regular-expression-matching原题内容如下所示: Implement regular expression matching with support for ‘.’ and ‘*’. ‘.’ Matches any single character. ‘*’ Matches zero

2017-10-08 23:47:45 286

原创 Leetcode | Convert BST to Greater Tree

原题链接:https://leetcode.com/problems/convert-bst-to-greater-tree原题目题意如下: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the origina

2017-10-02 00:53:03 245

原创 Leetcode | Smallest Range(Hard)

原题链接:https://leetcode.com/problems/smallest-range题目描述: You have k lists of sorted integers in ascending order. Find the smallest range that includes at least one number from each of the k lists.

2017-09-24 20:07:56 532

原创 Leetcode | Median of Two Sorted Arrays

题目来自:https://leetcode.com/problems/median-of-two-sorted-arrays原题描述: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overal

2017-09-17 13:56:00 225

原创 Leetcode | Longest Substring Without Repeating Characters

题目链接:(https://leetcode.com/problems/longest-substring-without-repeating-characters/)这道题简单的题意就是要我们找出一串字符串中最长的没包含重复字符的子字符串的长度,输入一段字符串,输出子字符串的长度。这道题刚一看上去以为挺简单的,但仔细一想还有许多细节问题要处理,像大多数人一样,做这种题我一开始还是用最笨的办法,最容

2017-09-10 14:57:23 249

空空如也

空空如也

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

TA关注的人

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