Given 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 num
If you have figured out the O(n) solution, try coding another solution using the divide and conquer approach, which is more subtle. 思路:这题在刚開始想用双指针解,可是
分类:
编程语言 时间:
2016-03-16 09:34:27
阅读次数:
137
Description How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We
分类:
其他好文 时间:
2016-03-15 20:53:47
阅读次数:
305
Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. Given the below binary tree: return 6. 一个二叉树的最大量
分类:
其他好文 时间:
2016-03-15 07:28:56
阅读次数:
171
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes
分类:
其他好文 时间:
2016-03-14 18:34:09
阅读次数:
207
Given n items with size Ai and value Vi, and a backpack with size m. What's the maximum value can you put into the backpack? Given 4 items with size [
分类:
其他好文 时间:
2016-03-14 15:18:34
阅读次数:
174
Given a binary tree, find its maximum depth.
分类:
其他好文 时间:
2016-03-13 14:29:24
阅读次数:
167
转自 CSND 想看更多的解题报告: http://blog.csdn.net/wangjian8006/article/details/7870410 &
分类:
其他好文 时间:
2016-03-13 11:17:12
阅读次数:
125
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <title>
分类:
其他好文 时间:
2016-03-12 13:22:08
阅读次数:
145