码迷,mamicode.com
首页 >  
搜索关键字:maximum    ( 4142个结果
Leetcode--Best Time to Buy and Sell Stock III
Problem Description: 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 complete at most two transa...
分类:其他好文   时间:2014-06-05 09:33:52    阅读次数:342
linux shell设置颜色
使用echo或者printf时,可以添加输出文本的颜色设置echo -e "Maximum \e[1;31m" $max_threads "\e[0mthreads allowed!" >> $term_dir/summary或者printf("\033[;34mfile\033[0m")31开始代...
分类:系统相关   时间:2014-06-03 09:11:52    阅读次数:306
[leetcode]Max Points on a Line @ Python
原题地址:https://oj.leetcode.com/problems/max-points-on-a-line/题意:Givennpoints on a 2D plane, find the maximum number of points that lie on the same strai...
分类:编程语言   时间:2014-06-03 08:55:48    阅读次数:282
HLG 2116 Maximum continuous product (最大连续积 DP)
链接:  http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2116 Description Wind and his GF(game friend) are playing a small game. They use the computer to randomly generated a nu...
分类:其他好文   时间:2014-06-03 02:17:13    阅读次数:252
leetcode -day24 Maximum Depth of Binary Tree & Binary Tree Zigzag Level Order Traversal
1、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 leaf node. clas...
分类:其他好文   时间:2014-06-02 23:13:22    阅读次数:290
Haskell递归
maximum函数取一组可排序的 List(属于 Ord Typeclass) 做参数,并回传其中的最大值。想想,在命令式风格中这一函数该怎么实现。很可能你会设一个变量来存储当前的最大值,然后用循环遍历该 List,若存在比这个值更大的元素,则修改变量为这一元素的值。到最后,变量的值就是运算结果。唔...
分类:其他好文   时间:2014-06-02 00:11:06    阅读次数:412
Best Time to Buy and Sell Stock III
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-05-30 16:19:05    阅读次数:320
Binary Tree Maximum Path Sum
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:其他好文   时间:2014-05-30 16:10:54    阅读次数:185
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-05-30 15:03:42    阅读次数:237
Best Time to Buy and Sell Stock II
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-05-30 15:00:54    阅读次数:335
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!