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

📄 three2.h

📁 数据结构中关于单链表的算法,将两个链表有序链合并成一个非递归有序的单链表,并不占用其他的存储空间
💻 H
字号:
#include <iostream.h>
template <class T> class List;
template <class T> class ListNode
{
	friend class List<T>;
	public:
		ListNode():link(null){}
		ListNode(T item,ListNode<T> * next=null):data(item),link(next){}
    private:
		T data;
		ListNode<T> * link;
};
template <class T> class List
{
	private:
		ListNode<T> * first, * last;
    public:
		List (T finishied) {first=last=new ListNode<T>(finished);}
		void merge(List<T>&hb);
		friend istream & operator>>(istream & in,List<T> inList);
        friend ostream & operator<<(ostream & out,List<T> outList);
};

⌨️ 快捷键说明

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