码迷,mamicode.com
首页 >  
搜索关键字:implement queue    ( 10759个结果
leetcode Single Number II
/* * Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without u...
分类:其他好文   时间:2014-10-04 14:32:16    阅读次数:211
C++中priority_queue的比较函数重载的两种方式
1.定义比较函数,以函数对象形式     这种方式使用时,需要把函数加入priority_queue的声明中去  struct com{   bool operator()( T &t1, T &t2)     {    } }; priority_queue, com>  que; 2.在结构体中重载 class T{ public: friend bool o...
分类:编程语言   时间:2014-10-03 16:40:34    阅读次数:292
Loadrunner 性能指标定位系统瓶颈
判断CPU瓶颈1, %processor time 平均值大于952, processor queue length大于2 (大于处理器个数+1).可以确定CPU瓶颈3, CPU空闲时间为零(zero percent idle CPU)4, 过高的用户占用CPU时间(%User Time)5, 过高...
分类:其他好文   时间:2014-10-03 13:23:14    阅读次数:171
page74-泛型可迭代的基础集合数据类型的API-Bag+Queue+Stack
【泛型可迭代的基础集合数据类型的API】背包:就是一种不支持从中删除元素的集合数据类型——它的目的就是帮助用例收集元素并迭代遍历所有收集到的元素。(用例也可以检查背包是否为空, 或者获取背包中元素的数量) public class Bag implements Iterable Bag() 创建.....
分类:Windows程序   时间:2014-10-02 20:39:13    阅读次数:417
【Leetcode】LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:其他好文   时间:2014-10-02 14:48:03    阅读次数:261
Implement strStr()
[leetcode]Implement strStr()....
分类:其他好文   时间:2014-10-02 10:38:22    阅读次数:154
C++模板应用 -----queue
本篇我们将实现Queue的简单操作;一、Queue版本1;通过本程序,我们可以看到 pop、push 、back、front、size的简单操作的实现;//Queue.hpp#ifndef QUEUE_H_#define QUEUE_H_#include template //默认的类型形参 >cl...
分类:编程语言   时间:2014-10-02 02:51:02    阅读次数:315
Collection_Other
package com.bjsxt.others.que; import java.util.ArrayDeque; import java.util.Queue; /** * 使用队列模拟银行存款业务 * @author Administrator * */ public class Demo01...
分类:其他好文   时间:2014-10-02 01:57:32    阅读次数:232
HDU 4441 Queue Sequence(splay)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4441题意:一个数列,三种操作:(1)插入:找到没在当前数列中的最小的正整数i,将其插在位置p之后,并将-i插入某个位置使得满足先进先出(i表示进,-i表示出),这个位置尽量靠右;(2)删除:删掉数字i以...
分类:其他好文   时间:2014-10-02 00:18:31    阅读次数:259
[Leetcode][JAVA] LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:编程语言   时间:2014-10-01 02:29:00    阅读次数:222
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!