码迷,mamicode.com
首页 >  
搜索关键字:刷题    ( 2326个结果
【leetcode刷题笔记】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 gas tank and it costs...
分类:其他好文   时间:2014-07-18 20:39:06    阅读次数:556
【leetcode刷题笔记】Binary Tree Level Order Traversal II
Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:其他好文   时间:2014-07-18 20:06:13    阅读次数:255
【leetcode刷题笔记】Search in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target value t...
分类:其他好文   时间:2014-07-18 20:00:41    阅读次数:205
【leetcode刷题笔记】N-Queens
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:其他好文   时间:2014-07-18 15:07:26    阅读次数:223
动态规划 is beginning。。。。。。。。。
感觉动态规划很模糊,怎么办呢??? 狂刷题吧!!!!!!!!!!!!!!!!!!!!!!!!! 1.POJ 2479 Maximum sum 首刷水题!!!! 双向统计最大和。 AC代码如下: #include #include #include #define inf -1000000000 using namespace std; int main() { int ...
分类:其他好文   时间:2014-07-18 12:37:39    阅读次数:228
【leetcode刷题笔记】Reverse Linked List II
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:其他好文   时间:2014-07-18 00:32:24    阅读次数:271
【leetcode刷题笔记】Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2014-07-17 23:27:12    阅读次数:216
【leetcode刷题笔记】Remove Duplicates from Sorted Array II
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:其他好文   时间:2014-07-17 22:24:40    阅读次数:216
【leetcode刷题笔记】Search a 2D Matrix
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:其他好文   时间:2014-07-17 18:09:32    阅读次数:258
【leetcode刷题笔记】Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:其他好文   时间:2014-07-17 17:32:50    阅读次数:246
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!