码迷,mamicode.com
首页 >  
搜索关键字:up    ( 7825个结果)
POJ 3728
题意: 一个树形图,有个二货商人,旅游时候还想着赚钱!从某个地方到另一个地方时,可以旅途中进一批货(应该人手不够,手里只能拿一批),然后在旅途中卖掉,求最大能赚多少钱。思路: 赤裸裸的LCA,ans(x,y)=max(up(x,lca),down(lca,y),maxp(lca,y)-min(l.....
分类:其他好文   时间:2014-08-29 22:32:08    阅读次数:236
Leetcode 动态规划 Unique Paths II
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Unique Paths II  Total Accepted: 13655 Total Submissions: 49081My Submissions Follow up for "Unique Paths": Now consider i...
分类:其他好文   时间:2014-08-29 16:12:34    阅读次数:236
LeetCode Linked List Cycle II 超时问题
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?题目意...
分类:其他好文   时间:2014-08-29 12:44:37    阅读次数:256
(015)实现一个函数检查一棵树是否平衡(keep it up)
实现一个函数检查一棵树是否平衡。对于这个问题而言, 平衡指的是这棵树任意两个叶子结点到根结点的距离之差不大于1。 这个题我们可以采用暴力搜索,找到叶子节点到根节点的最小值和最大值,然后他们的差如果大于1就不是平衡树,反之 则是平衡树。 int MinDepth = std::numeric_limits::max(); int MaxDepth = std::numeric_limits::...
分类:其他好文   时间:2014-08-29 02:52:57    阅读次数:197
LeetCode Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?/** * Definition for singly-linked list. *...
分类:其他好文   时间:2014-08-28 19:41:25    阅读次数:224
Amazon Kindle Device is hiring in Beijing Shanghai and Shenzhen!
This is Angela from recruitment team of Amazon Kindle Device Software & Applications, we are expanding and setting up new R&D center in Beijing, we de...
分类:其他好文   时间:2014-08-28 19:39:15    阅读次数:263
wpf button的mouse(leftbutton)down/up,click事件不响应解决办法
按照WPF的帮助说明,某些控件的路由事件被内部处理了,已经被标记为Handled,自行定义的事件处理代码便不再起作用了,有时候会很郁闷! 不过WPF提供了必要的方法。 1)使用相应的Preview事件。须注意隧道类型的事件是从根元素开始执行的。 2)使用AddHandler添加自定义的路...
分类:其他好文   时间:2014-08-28 12:52:29    阅读次数:179
014写程序将一个栈按升序排序,对这个栈是如何实现的,你不应该做任何特殊的假设(keep it up)
写程序将一个栈按升序排序。对这个栈是如何实现的,你不应该做任何特殊的假设。 程序中能用到的栈操作有:push | pop |isEmpty 最容易想到的就是优先队列来做此题,容易实现。 另外我们可以再用一个栈来实现栈的升序排列。 优先队列: //优先队列来实现 void sortStack(std::stack& vStk) { std::priority_queue, std::gr...
分类:其他好文   时间:2014-08-28 02:07:58    阅读次数:197
OCP试题解析之053-17 CONFIGURE CONTROLFILE AUTOBACKUP ON
17.You configure AUTOBACKUP to ON in an RMAN session. When will RMAN back up the control file? (Choose all that apply.) A. When you run an RMAN BACKUP command B. When you run an RMAN ALLOCATE comma...
分类:其他好文   时间:2014-08-28 00:53:58    阅读次数:189
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!