Table of Contents

Class BagWithLinkedList<T>

Namespace
AlgorithmsSW.Bag
Assembly
AlgorithmsSW.dll

An implementation of IBag<T> that uses a LinkedList<T> for its implementation.

[AlgorithmReference(1, 4)]
public sealed class BagWithLinkedList<T> : IBag<T?>, IEnumerable<T?>, IEnumerable

Type Parameters

T
Inheritance
BagWithLinkedList<T>
Implements
IBag<T>
Inherited Members
Extension Methods

Properties

Count

Gets the number of elements in the bag.

public int Count { get; }

Property Value

int

Methods

Add(T?)

Adds an item to the bag.

public void Add(T? item)

Parameters

item T

The item to add.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<T?> GetEnumerator()

Returns

IEnumerator<T>

An enumerator that can be used to iterate through the collection.