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

📄 minheap.h

📁 插入和删除最小元素操作
💻 H
字号:
// MinHeap.h: interface for the MinHeap class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MINHEAP_H__3743AE3C_F411_4C0F_8633_B77B2C6A91F0__INCLUDED_)
#define AFX_MINHEAP_H__3743AE3C_F411_4C0F_8633_B77B2C6A91F0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <iostream>

using std::cout;
using std::cin;
using std::endl;

struct Element
{
	int key;
};

class MinHeap
{
public:
	MinHeap( int sz );
	bool IsFull();
	void Insert( const Element& );
	bool isEmpty();
	Element* Delete( Element& );
private:
	Element *heap;
	int n;
	int MaxSize;

};

#endif // !defined(AFX_MINHEAP_H__3743AE3C_F411_4C0F_8633_B77B2C6A91F0__INCLUDED_)

⌨️ 快捷键说明

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