码迷,mamicode.com
首页 >  
搜索关键字:lowest    ( 451个结果
1036. Boys vs Girls (25)
This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Input Specification: Each input file contains one t...
分类:其他好文   时间:2015-04-29 17:12:41    阅读次数:131
Hdoj 1196 Lowest Bit 【&】
Lowest BitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9273 Accepted Submission(s): 6824Problem Description Given an positive integer A...
分类:其他好文   时间:2015-04-23 23:32:14    阅读次数:185
Build Lowest Number by Removing n digits from a given number
Given a string ‘str’ of digits and an integer ‘n’, build the lowest possible number by removing ‘n’ digits from the string and not changing the order ...
分类:其他好文   时间:2015-04-16 11:49:38    阅读次数:179
Next Permutation--LeetCode
mplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible or...
分类:其他好文   时间:2015-04-13 12:54:13    阅读次数:122
杭电 HDU ACM 2028 Lowest Common Multiple Plus
Lowest Common Multiple Plus Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 39183    Accepted Submission(s): 16144 Problem Description ...
分类:其他好文   时间:2015-04-09 23:49:44    阅读次数:285
Lowest Common Ancestor of The Two Nodes in a Binary Tree
root指向一棵二叉树的头结点,p和q分别指向该二叉树中任意两个结点的指针,编写算法,找到p和q的最近公共祖先结点r。 为了不失一般性,设p在q的左边。同时,为了编写方便,将以p和q所指结点的值代替p和q本身。根据【后续遍历最后访问根节点,在递归算法中,根是压在栈底的】,很容易想到,采用后序遍历非递归算法:栈中存放二叉树结点的指针。当访问到某结点时,栈中所有的元素都是该结点的祖先。设一个辅助栈,当没...
分类:其他好文   时间:2015-04-04 21:18:20    阅读次数:150
LeetCode-Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible...
分类:其他好文   时间:2015-04-02 16:32:47    阅读次数:116
RMQ 问题之Sparse_Table算法
RMQ问题,全名(Range Minimum/Maximum Query),是求给定区间中的最值问题。 主要方法及复杂度如下: 1、朴素(即搜索),O(n)-O(qn) online。 2、线段树,O(n)-O(qlogn) online。 3、Sparse_Table(实质是动态规划),O(nlogn)-O(1) online。 4、RMQ标准算法:先规约成LCA(Lowest C...
分类:编程语言   时间:2015-04-01 17:43:37    阅读次数:174
杭电 HDU 1196 Lowest Bit
Lowest Bit Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9052    Accepted Submission(s): 6656 Problem Description Given an positive i...
分类:其他好文   时间:2015-03-30 09:23:04    阅读次数:125
Lintcode: Lowest Common Ancestor
Given the root and two nodes in a Binary Tree. Find the lowest common ancestor(LCA) of the two nodes.The lowest common ancestor is the node with large...
分类:其他好文   时间:2015-03-12 06:25:09    阅读次数:117
451条   上一页 1 ... 38 39 40 41 42 ... 46 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!