Skip to content

Instantly share code, notes, and snippets.

View ElysiumWhale's full-sized avatar

Aleksei Gurin ElysiumWhale

View GitHub Profile
@ElysiumWhale
ElysiumWhale / LimitedSizeStack.cs
Created March 26, 2021 06:40
Stack-like working collection class which drops bottom value while adding new value if store is full
public class LimitedSizeStack<T>
{
private int _count;
private int _index;
private int _limit;
private T[] _data;
public int Count => _count;
public int Limit => _limit;