代码搜索:queue
找到约 10,000 项符合「queue」的源代码
代码结果 10,000
www.eeworm.com/read/333008/12711170
cpp 请求调页.cpp
#include
#include
#include
#define M 40
int N;
int queue[M];
int Y[M];
int F;
float S[3][2];
struct Pro
{
int num,time;
};
/*
int Input(int m,Pro p[M
www.eeworm.com/read/332926/12716877
c 6.46.c
6.46③ 编写复制一棵二叉树的非递归算法。
要求实现下列函数:
void CopyBiTree(BiTree T, BiTree &TT);
/* 基于层次遍历的非递归复制二叉链表 */
二叉链表类型定义:
typedef char TElemType; // 设二叉树的元素为char类型
typedef struct BiTNode {
TElemType
www.eeworm.com/read/332926/12716934
c 3.31.c
◆3.31③ 假设称正读和反读都相同的字符序列为
"回文",例如,'abba'和'abcba'是回文,'abcde'
和'ababab'则不是回文。试写一个算法判别读入的
一个以'@'为结束符的字符序列是否是"回文"。
实现下列函数:
Status Palindrome(char *word);
/* 利用栈和队列判定字符序列word是否是回文 */
可使用栈Stack和
www.eeworm.com/read/332926/12716948
c 6.49.c
6.49④ 编写算法判别给定二叉树是否为完全二叉树。
要求实现下列函数:
Status CompleteBiTree(BiTree bt);
/* judge if the binary tree whose root is bt */
/* is a complete tree. */
二叉链表类型定义:
typedef struc
www.eeworm.com/read/332926/12716994
c 7.23.c
7.23③ 同7.22题要求。试基于图的广度优先搜索策略写一算法。
实现下列函数:
Status BfsReachable(ALGraph g, int i, int j);
/* Determine whether it exists path from vertex i to */
/* vertex j in digraph g with Breadth_First Searc
www.eeworm.com/read/332926/12717021
c 6.47.c
6.47④ 编写按层次顺序(同一层自左至右)遍历二叉树的算法。
要求实现下列函数:
void LevelOrder(BiTree bt, char *ss);
/* travel BiTree bt by level, Return result by ss. */
二叉链表类型定义:
typedef char TElemType; // 设二叉树的元素为char类型
ty
www.eeworm.com/read/332553/12748382
cpp 3。4。1.cpp
#include"3。4。1.h"
#include"iostream.h"
template
Queue::Queue(int s)
{
//构造函数。创建队列空间,生成一个空队列
MaxSize=s;
elements=new T [MaxSize]; //创建队列空间
front=re
www.eeworm.com/read/332553/12748387
h 3。4。1.h
template
class Queue
{
//循环队列的类定义
private:
int rear,front; //队尾、队头指针
T *element; //存放队列元素的数组
int MaxSize;
www.eeworm.com/read/332349/12763017
cpp 04020.cpp
#include
#include
using namespace std;
ifstream fin("input.txt");
ofstream fout("output.txt");
template
class Queue{
public:
Queue() {front=rear=0;}
www.eeworm.com/read/144877/12764906
cpp main.cpp
#include"iostream.h"
#include"Queue.h"
#include"Stack.h"
#include "Adapter.h"
void main()
{
Stack *s=new Stack();
Queue *q=new Adapter(s);
int i;
for(i=1;iEnQueue(