自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(197)
  • 资源 (7)
  • 收藏
  • 关注

原创 Restore IP Addresses

Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return ["255.255.11.135",

2017-05-30 17:09:17 284

原创 Clone Graph

Clone GraphClone 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 s

2017-05-23 15:35:15 223

原创 Gas Station

Gas StationThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel fro

2017-05-23 14:53:50 330

原创 Lowest Common Ancestor of a Binary Tree

Lowest Common Ancestor of a Binary TreeGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the definition of LCA on Wikipedia: “The lowest

2017-05-19 10:32:50 191

原创 Remove Duplicates from Sorted List II

Remove Duplicates from Sorted List IIGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2->

2017-05-19 10:07:32 239

原创 Reverse Linked List II

Reverse Linked List IIReverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.N

2017-05-19 09:40:39 197

原创 Minimum Size Subarray Sum

Minimum Size Subarray SumGiven an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't one, return 0 ins

2017-05-16 22:12:20 183

原创 Merge Intervals

Merge IntervalsGiven a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].解析:排序再找区间代码:/** * Defini

2017-05-16 20:51:17 214

原创 Jump Game

Jump GameGiven 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-05-16 20:37:05 175

原创 Distinct Subsequences

Distinct SubsequencesGiven a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original string b

2017-05-16 19:44:09 175

原创 Search for a Range

Search for a RangeGiven an array of integers sorted in ascending order, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order

2017-05-16 15:50:01 173

原创 Course Schedule

Course ScheduleThere 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, w

2017-05-16 15:24:55 235

原创 Unique Substrings in Wraparound String

Unique Substrings in Wraparound StringConsider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so s will look like this: "...zabcdefghijklmnopqrstuvwxyzabc

2017-05-15 21:52:50 209

原创 Construct Binary Tree from Preorder and Inorder Traversal

Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the t

2017-05-15 20:19:20 262

原创 Patching Array

Patching ArrayGiven a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n]inclusive can be formed by the sum of some elemen

2017-05-15 20:03:56 191

原创 Russian Doll Envelopes

Russian Doll EnvelopesYou have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the width and height of o

2017-05-14 17:19:56 476

原创 Frog Jump

Frog JumpA frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but it must not jump into the water.

2017-05-14 16:37:26 238

原创 Construct Binary Tree from Inorder and Postorder Traversal

Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the

2017-05-14 15:47:32 178

原创 Palindrome Partitioning

Palindrome PartitioningGiven a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example, given s = "a

2017-05-14 15:18:43 145

原创 Permutations II

Permutations IIGiven a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique permutations:[ [1,1,

2017-05-14 14:45:17 246

原创 Partition List

Partition ListGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of

2017-05-14 12:56:23 139

原创 Sliding Window Maximum

Sliding Window MaximumGiven an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Ea

2017-05-12 16:28:36 207

原创 Palindrome Linked List

Palindrome Linked ListGiven a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?Subscribe to see which companies asked this

2017-05-12 15:34:02 153

原创 Max Sum of Rectangle No Larger Than K

Max Sum of Rectangle No Larger Than KGiven a non-empty 2D matrix matrix and an integer k, find the max sum of a rectangle in the matrix such that its sum is no larger than k.Example:Give

2017-05-12 14:50:53 211

原创 Insertion Sort List

Insertion Sort ListSort a linked list using insertion sort.Subscribe to see which companies asked this question.解析:插入排序,注意指针的指向代码:/** * Definition for singly-linked list. * s

2017-05-12 10:51:04 136

原创 01 Matrix

01 MatrixGiven a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell.The distance between two adjacent cells is 1.Example 1: Input:0 0 00 1 00 0 0Output:

2017-05-11 10:46:34 212

原创 Search in Rotated Sorted Array II

Search in Rotated Sorted Array IIFollow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Suppose an array

2017-05-10 20:39:29 203

原创 Serialize and Deserialize Binary Tree

Serialize and Deserialize Binary TreeSerialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmi

2017-05-10 18:56:23 163

原创 Largest Divisible Subset

Largest Divisible SubsetGiven a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or Sj % Si = 0.

2017-05-10 15:51:38 180

原创 Pacific Atlantic Water Flow

Pacific Atlantic Water FlowGiven 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 ma

2017-05-10 14:57:08 190

原创 Perfect Number

Perfect NumberWe define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself.Now, given an integer n, write a function that returns tr

2017-05-09 22:37:27 170

原创 Group Anagrams

Group AnagramsGiven an array of strings, group anagrams together.For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return:[ ["ate", "eat","tea"], ["nat","tan"], ["bat

2017-05-09 22:12:36 175

原创 Convert Sorted List to Binary Search Tree

Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.Subscribe to see which companies ask

2017-05-09 21:36:04 152

原创 Find All Anagrams in a String

Find All Anagrams in a StringGiven a string s and a non-empty string p, find all the start indices of p's anagrams in s.Strings consists of lowercase English letters only and the length of b

2017-05-09 21:10:41 304

原创 Binary Tree Zigzag Level Order Traversal

Binary Tree Zigzag Level Order TraversalGiven a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alte

2017-05-09 20:49:04 164

原创 Bitwise AND of Numbers Range

Bitwise AND of Numbers RangeGiven a range [m, n] where 0 For example, given the range [5, 7], you should return 4.Credits:Special thanks to @amrsaqr for adding this problem and creatin

2017-05-09 20:25:11 179

原创 Reverse Pairs

Reverse PairsGiven an array nums, we call (i, j) an important reverse pair if i  and nums[i] > 2*nums[j].You need to return the number of important reverse pairs in the given array.E

2017-05-09 16:12:53 493

原创 Count of Smaller Numbers After Self

Count of Smaller Numbers After SelfYou are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smaller e

2017-05-09 11:05:12 140

原创 Range Sum Query - Mutable

Range Sum Query - MutableGiven an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.The update(i, val) function modifies nums by updating the el

2017-05-09 11:01:55 142

原创 Freedom Trail

Freedom TrailIn the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial to spell a specific keyword in orde

2017-05-08 16:44:55 305

Visual Assist X 10.8.2029.0(支持2013) 完美破解版

Visual Stdio助手

2016-08-16

用于地理坐标计算的proj4库

proj库,不同坐标转换

2016-08-16

编译好的GDAL

编译好的GDAL库,C++,可直接使用

2016-08-16

SAI 手写板绘图工具软件

绘图工具,比PS小巧方便的工具,效果很好,同时支持手写板的功能

2014-11-14

期刊管理系统界面

很好的期刊管理系统界面设计的ppt,很详尽的界面具体设计

2013-12-22

C++教程详细版

详尽的C++教程,可以快速提高的资源,信息完备

2012-11-25

VS2010基本教程

详细,适合初学者,讲解透彻,一看即明白,水平可以得到很快提高

2012-11-25

空空如也

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

TA关注的人

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