码迷,mamicode.com
首页 >  
搜索关键字:note    ( 7358个结果
[LeetCode] Rotate Array
Rotate an array of n elements to the right by k steps.For example, with n=7n = 7 and k=3k = 3, the array [1,2,3,4,5,6,7][1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4][5,6,7,1,2,3,4].Note: Try to come u...
分类:其他好文   时间:2015-02-24 18:44:30    阅读次数:164
[LeetCode] Rotate Array 旋转数组
Rotate an array ofnelements to the right byksteps.For example, withn= 7 andk= 3, the array[1,2,3,4,5,6,7]is rotated to[5,6,7,1,2,3,4].Note:Try to come...
分类:编程语言   时间:2015-02-24 16:19:43    阅读次数:4707
[LeetCode]76.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 O(n).For example, S = “ADOBECODEBANC” T = “ABC” Minimum window is “BANC”.Note...
分类:Windows程序   时间:2015-02-24 13:48:53    阅读次数:210
[LeetCode] Binary Tree Postorder Traversal
Given a binary tree, return the postorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3}, return [3,2,1].Note: Recursive solution is trivial, could you do it iteratively?...
分类:其他好文   时间:2015-02-24 07:02:03    阅读次数:180
[LeetCode] Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3}, return [3,2,1].Note: Recursive solution is trivial, could you do it iteratively?递归...
分类:其他好文   时间:2015-02-24 01:53:20    阅读次数:192
[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 ...
分类:其他好文   时间:2015-02-23 15:26:34    阅读次数:168
[LeetCode] Best Time to Buy and Sell Stock IV
Say you have an array for which the ithi^{th} element is the price of a given stock on day ii.Design an algorithm to find the maximum profit. You may complete at most k transactions.Note: You may not...
分类:其他好文   时间:2015-02-23 00:16:37    阅读次数:174
[LeetCode] Best Time to Buy and Sell Stock III
Say you have an array for which the ithi^{th} element is the price of a given stock on day ii.Design an algorithm to find the maximum profit. You may complete at most two transactions.Note: You may no...
分类:其他好文   时间:2015-02-22 18:31:15    阅读次数:181
Leetcode: Multiply Strings
Problem: Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-negative. Solution: multiply...
分类:其他好文   时间:2015-02-22 14:38:15    阅读次数:101
[LeetCode] Binary Tree Inorder Traversal 二叉树的中序遍历
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:其他好文   时间:2015-02-22 06:46:02    阅读次数:162
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!