⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lru.h

📁 LRU对列队的实现,就是实现找出最近最少用的元素的算法.
💻 H
字号:

#include <iostream.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>

#define LEASTPAGES 8
#define MAXSIZE 5
#define OK 1
#define ERROR -1
#define FALSE 0
#define TRUE 1

typedef int Status;
typedef int ElemType;

typedef struct Queue{
	ElemType *base;
	int front;
	int rear;
}Queue, *QueueLink;

Status InitQueue( Queue &Q );
Status QueueLength( Queue Q );
Status EnQueue( Queue &Q, ElemType e );
Status VisualQueue( Queue Q );
int find( Queue &Q, int nID );

void Init( Queue &Q1, Queue &Q2 );
void play( Queue &Q1, Queue &Q2 );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -