Method FindDuplicates
FindDuplicates<T>(Stack<T>, IEqualityComparer<T>)
Find all duplicates stack objects values.
public static Stack<T> FindDuplicates<T>(this Stack<T> stack, IEqualityComparer<T> comparer = null)
Parameters
stack
Stack<T>The stack object.
comparer
IEqualityComparer<T>The comparison object.
Returns
- Stack<T>
The duplicates stack object.
Type Parameters
T
The stack object type.