码迷,mamicode.com
首页 >  
搜索关键字:简单题    ( 1039个结果
POJ 2104 区间第K大值(划分树做法)
由于深感自己水平低下,把大部分有效时间放在了刷题上,于是好久没写题解了。今天刚学了下划分树的原理,于是写道简单题练练手。题目链接:http://poj.org/problem?id=2104划分树的空间复杂度和时间复杂度均为O(nlogn),对于解决该问题而言,每次查询的复杂度为O(logn),比归...
分类:其他好文   时间:2015-06-11 22:35:29    阅读次数:139
HDU题目分类
注:网上搜的 第一篇    1001 这个就不用说了吧 1002 简单的大数 1003 DP经典问题,最大连续子段和 1004 简单题 1005 找规律(循环点) 1006 感觉有点BT的题,我到现在还没过 1007 经典问题,最近点对问题,用分治 1008 简单题 1009 贪心 1010 ...
分类:其他好文   时间:2015-06-11 14:40:24    阅读次数:94
Minimum Depth of Binary Tree
就recursive做,简单题public class Solution { public int minDepth(TreeNode root) { if(root==null) return 0; if (root.left==null && root.righ...
分类:其他好文   时间:2015-06-10 06:35:28    阅读次数:138
Path Sum I, II
简单题IGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given su...
分类:其他好文   时间:2015-06-10 06:33:31    阅读次数:101
Same Tree
简单题ref“使用的是先序遍历,算法的复杂度跟遍历是一致的,如果使用递归,时间复杂度是O(n),空间复杂度是O(logn)。” by codegankerhttp://blog.csdn.net/linhuanmars/article/details/22839819?Time to search ...
分类:其他好文   时间:2015-06-10 06:32:13    阅读次数:104
uva540 Team Queue by sixleaves
这道题目、主要是对队列的灵活应用。其实就是一道模拟题目,只要你洞察出题目的本质就十分简单。题目意思大体是有多组测试数据,每组的一开始是一个数字t,代表一共有多少的团队,接着是t行输入,每一行都由一个数字n开头,表示队伍的人数。在这之后,输入诺干行的操作指令,E x代表入编号为x的入队列,这里的队列是...
分类:其他好文   时间:2015-06-05 00:20:32    阅读次数:116
(转)
来源:http://blog.csdn.net/vsooda/article/details/72936551001 这个就不用说了吧1002 简单的大数1003 DP经典问题,最大连续子段和1004 简单题1005 找规律(循环点)1006 感觉有点BT的题,我到现在还没过1007 经典问题,最近...
分类:其他好文   时间:2015-06-04 21:00:03    阅读次数:114
URAL 1152 Faise Mirrors 状压DP 简单题
1152. False MirrorsTime limit: 2.0 secondMemory limit: 64 MBBackgroundWe wandered in the labyrinth for twenty minutes before finally entering the larg...
分类:其他好文   时间:2015-06-03 00:56:38    阅读次数:184
Length of Last Word
简单题public class Solution { public int lengthOfLastWord(String s) { s = s.trim(); if(s==null||s.length()==0) return 0; int len ...
分类:其他好文   时间:2015-06-02 08:05:04    阅读次数:118
多校+CF简单题
A -The Unsolvable ProblemTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionThere are many unsolvable problem in...
分类:其他好文   时间:2015-05-29 17:33:31    阅读次数:273
1039条   上一页 1 ... 67 68 69 70 71 ... 104 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!