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

📄 llist.h

📁 判断链表是否相交 若相交
💻 H
字号:
#include "Node.h"
#include <iostream>
using namespace std;
//////link/////////
class LList{
private:
	Node *head;
	void init(){							//initial the link
	 head = tail = fence = new Node();
	 length = 0;
	}
public:
	int length;
	Node *fence;	
	Node *tail;
	LList(){init();}
	bool append(int elem);					//add element in the last
	void setTail(Node *temp) {				//reset the tail ,make it intersect
	tail->next = temp;
	}
	int setEnd() {
		while(tail->next!=NULL){tail = tail->next;length++;}
		return length;
	}
};

⌨️ 快捷键说明

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