Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4,?1,2, ...
分类:
其他好文 时间:
2016-06-29 21:53:36
阅读次数:
119
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4,?1,2, ...
分类:
其他好文 时间:
2016-06-29 19:07:16
阅读次数:
157
<html>
<head>
<metacharset="utf-8">
<metahttp-equiv="X-UA-Compatible"content="IE=edge,chrome=1">
<metaname="viewport"content="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0">
<metaco..
分类:
移动开发 时间:
2016-06-29 16:09:14
阅读次数:
265
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-06-29 13:00:29
阅读次数:
138
一天一道LeetCode
本系列文章已全部上传至我的github,地址:ZeeCoder‘s Github
欢迎大家关注我的新浪微博,我的新浪微博
欢迎转载,转载请注明出处
(一)题目来源:https://leetcode.com/problems/maximum-depth-of-binary-tree/
Given a binary tree, find its maximu...
分类:
其他好文 时间:
2016-06-29 11:32:26
阅读次数:
185
题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may co ...
分类:
其他好文 时间:
2016-06-29 11:06:49
阅读次数:
142
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple ...
分类:
其他好文 时间:
2016-06-28 23:43:30
阅读次数:
166
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4,?1,2, ...
分类:
其他好文 时间:
2016-06-28 23:22:05
阅读次数:
190
维持三个变量,localMax, localMin, global. 需要注意的是更细localMax/localMin的时候,后更新的那个需要先更新的那个的原始值,所以需要存一下 ...
分类:
其他好文 时间:
2016-06-28 07:05:13
阅读次数:
154
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-06-27 23:06:20
阅读次数:
203