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

📄 linkedbasiclistwithrecclone.java

📁 国外的数据结构与算法分析用书
💻 JAVA
字号:
import dslib.list.*;

/**	A variation of LinkedBasicListUos with a recursive implementation of listClone(). */
public class LinkedBasicListWithRecClone extends LinkedBasicListUos 
{
	/**	Construct an empty list. <br>
		Analysis: Time = O(1) */
	public LinkedBasicListWithRecClone()
	{
		super();
	}

	/**	Return a list clone of this list. <br>
		Analysis: Time = O(k), k = number of items in the list */
	public SimpleListUos listClone()
	{
		if (isEmpty())
			return (SimpleListUos) clone();
		else
		{
			SimpleListUos result = ((LinkedBasicListWithRecClone) firstRemainder()).listClone();
			result.insertFirst(firstItem());
			return result;
		}
	}

}

⌨️ 快捷键说明

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