0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[PSP演習] 1A リンクリスト作成

Posted at

下記の「TODO」を埋めて、リンクリストを完成させよ。

public class MyLinkedList<T> : IEnumerable<T>
{
	internal class Item
	{
		internal T Value;
		internal Item Next;
		public Item(T t){ Value = t; }
	}
	public int Length { get; private set; }
	private Item Top;
	public MyLinkedList()
	{
		// TODO:初期化
	}
	public void AddLast(T t)
	{
		// TODO:追加
	}
	public IEnumerator<T> GetEnumerator()
	{
		// TODO:反復子
	}
	System.Collections.IEnumerator
		System.Collections.IEnumerable.GetEnumerator()
	{
		return GetEnumerator();
	}
}
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?