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

📄 llist.h

📁 判断链表中是否有循环 有的话
💻 H
字号:
#include "Node.h"
#include <iostream>
using namespace std;
//////链表类//////////
class LList{
private:
	Node *tail;
	Node *fence;
	void init(){							//初始化
	 head = tail = fence = new Node();
	}
public:
	Node *head;
	LList(){init();}
	bool append(int elem);					//追加元素
	bool circleInList();					//判断是否循环
	void print();							//打印一次循环元素
	void setTail(Node *temp) {				//构造循环
	tail->next = temp;
	}
};

⌨️ 快捷键说明

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