自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

原创 [LeetCode] Minimum Window Substring

Minimum Window Substring Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity ...

2015-08-26 16:14:10 626 0

原创 [LeetCode] Edit Distance

Edit Distance Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted a...

2015-08-25 14:59:20 589 0

原创 [LeetCode] Missing Number

Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For ex...

2015-08-24 14:52:42 790 0

原创 [LeetCode] Text Justification

Text Justification Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and righ...

2015-08-24 14:11:57 595 0

原创 [LeetCode] Insert Interval

Insert Interval Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that ...

2015-08-23 17:25:13 607 0

原创 [LeetCode] Merge Intervals

Merge Intervals Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,...

2015-08-23 16:31:43 696 0

原创 [LeetCode] N-Queens II

N-Queens II   Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions. ...

2015-08-22 12:27:22 685 0

原创 [LeetCode] N-Queens

N-Queens The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an ...

2015-08-22 12:03:29 689 0

原创 [LeetCode] Ugly Number II

Ugly Number II Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For exa...

2015-08-21 22:26:46 869 0

原创 网站下的robots

面试某软,被面试官问道:你做爬虫,知不知道很多网站下都有个robots文件?     答曰:不知。     于是面试官给我演示了一遍~     遂卒。首战惨败。     下来查了维基百科,基本了解robots。https://zh.wikipedia.org...

2015-08-20 10:54:43 1115 0

原创 [LeetCode] Ugly Number

Ugly Number Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only inc...

2015-08-19 18:59:26 851 0

原创 [LeetCode] Group Anagrams

Group Anagrams Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", &q...

2015-08-19 11:07:03 3206 0

原创 [LeetCode] Single Number III

Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twi...

2015-08-17 17:13:47 3266 3

原创 [LeetCode] Sort List

Sort List Sort a linked list in O(n log n) time using constant space complexity. 解题思路: 题意为以常量存储空间和O(nlogn)时间复杂度来排序链表。 可以用合并排序法,并用双指针法来找到中间节...

2015-08-17 15:52:55 597 0

原创 [LeetCode] Different Ways to Add Parentheses

Different Ways to Add Parentheses Given a string of numbers and operators, return all possible results from computing all the different possible...

2015-08-17 11:20:08 891 0

原创 [LeetCode] Add Digits

Add Digits Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num =...

2015-08-17 10:14:16 1250 2

原创 [LeetCode] Binary Tree Paths

Binary Tree Paths   Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 ...

2015-08-17 09:48:55 1114 0

原创 [LeetCode] Gas Station

Gas Station There 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...

2015-08-16 22:14:05 511 0

原创 [LeetCode] Clone Graph

Clone Graph Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serial...

2015-08-16 17:56:39 587 0

原创 [LeetCode] Palindrome Partitioning

Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindr...

2015-08-16 17:07:38 611 0

原创 [LeetCode] Surrounded Regions

Surrounded Regions Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region i...

2015-08-16 15:31:08 495 0

原创 [LeetCode] Sum Root to Leaf Numbers

Sum Root to Leaf Numbers Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the ...

2015-08-14 15:20:04 672 0

原创 [LeetCode] Word Ladder

Word Ladder Given two words (beginWord and endWord), and a dictionary, find the length of shortest transformation sequence from beginWord to end...

2015-08-14 14:57:56 695 0

原创 [LeetCode] Best Time to Buy and Sell Stock III

Best Time to Buy and Sell Stock III Say you have an array for which the ith element is the price of a given stock on day i. Design an algor...

2015-08-13 20:54:53 500 0

原创 [LeetCode] Best Time to Buy and Sell Stock II

Best Time to Buy and Sell Stock II Say you have an array for which the ith element is the price of a given stock on day i. Design an algorith...

2015-08-13 17:04:07 503 0

原创 [LeetCode] Best Time to Buy and Sell Stock

Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only perm...

2015-08-13 16:49:25 574 0

原创 [LeetCode] Triangle

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

2015-08-12 17:11:39 488 0

原创 [LeetCode] Populating Next Right Pointers in Each Node II

Populating Next Right Pointers in Each Node II Follow up for problem "Populating Next Right Pointers in Each Node". What if the giv...

2015-08-12 15:53:02 618 0

原创 [LeetCode] Populating Next Right Pointers in Each Node

Populating Next Right Pointers in Each Node Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; ...

2015-08-12 14:35:14 610 0

原创 [LeetCode] Flatten Binary Tree to Linked List

Flatten Binary Tree to Linked List Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / \ ...

2015-08-11 18:03:52 553 0

原创 [LeetCode] Convert Sorted List to Binary Search Tree

Convert Sorted List to Binary Search Tree Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced...

2015-08-11 16:49:59 533 0

原创 [LeetCode] Convert Sorted Array to Binary Search Tree

Convert Sorted Array to Binary Search Tree Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 解题思路...

2015-08-11 16:12:31 570 0

原创 [LeetCode] Construct Binary Tree from Preorder and Inorder Traversal

Construct Binary Tree from Preorder and Inorder Traversal Given preorder and inorder traversal of a tree, construct the binary tree. Note: You...

2015-08-11 16:03:22 451 0

原创 [LeetCode] Binary Tree Zigzag Level Order Traversal

Binary Tree Zigzag Level Order Traversal Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left ...

2015-08-07 13:08:23 564 0

原创 [LeetCode] Validate Binary Search Tree

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

2015-08-07 12:11:54 614 0

原创 [LeetCode] Unique Binary Search Trees II

Unique Binary Search Trees II Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example...

2015-08-06 16:02:46 524 0

原创 [LeetCode] Unique Binary Search Trees

Unique Binary Search Trees   Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, G...

2015-08-06 14:59:03 492 0

原创 [LeetCode] Binary Tree Inorder Traversal

Binary Tree Inorder Traversal Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3...

2015-08-06 13:48:27 475 0

原创 [LeetCode] Reverse Linked List II

Reverse Linked List II Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4-&g...

2015-08-05 14:08:50 423 0

原创 [LeetCode] Partition List

Partition List Given 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. ...

2015-08-05 11:55:42 408 0

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