自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 52. N-Queens II[hard]

Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.经典N皇后问题,直接dfs即可class Solution {public: int a

2016-11-30 22:32:39 149

原创 312. Burst Balloons[hard]

Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst balloon i you will get num

2016-11-30 22:28:57 137

原创 145. Binary Tree Postorder Traversal[hard]

Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].Note: Recursive solut

2016-11-30 22:27:39 130

原创 154. Find Minimum in Rotated Sorted Array II[hard]

Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Suppose a sorted array is rotated at some pivot unk

2016-11-30 22:23:51 122

原创 42. Trapping Rain Water[hard]

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1]

2016-11-30 22:19:19 174

原创 212. Word Search II[hard]

Given a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those hor

2016-11-30 22:15:56 114

原创 140. Word Break II[hard]

Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example, givens = "

2016-11-30 22:09:07 131

原创 126. Word Ladder II[hard]

Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such that:Only one letter can be changed at a timeEac

2016-11-30 22:03:00 172

原创 135. Candy[hard]

135. CandyThere are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must

2016-09-14 12:17:34 123

原创 84. Largest Rectangle in Histogram[hard]

84. Largest Rectangle in HistogramGiven n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.

2016-09-14 11:22:23 137

原创 41. First Missing Positive[hard]

41. First Missing Positive[hard]Total Accepted: 74444Total Submissions: 303858Difficulty: HardGiven an unsorted integer array, find the first missing positive integer. For exampl

2016-09-12 23:36:18 124

原创 146. LRU Cache[hard]

146. LRU Cache Total Accepted: 86514Total Submissions: 545459Difficulty: HardDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the follow

2016-09-12 23:29:41 115

空空如也

空空如也

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

TA关注的人

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