Core/CafeLib.Core.Collections/Heaps/BinaryHeap.cs
/// <summary>
/// Removes the bottom item from the binary heap.
/// </summary>
/// <returns>value</returns>
Removes the bottom item from the binary heap.
Removes the bottom item from the binary heap .
public T Remove()
        {
            lock (HeapLock.Mutex)
            {
                if (Count == 0)
                    return default;
                var topItem = _list[1];
                _list[1] = _list[Count];
                _list.RemoveAt(Count);
                TrickleDown(1);
                return topItem;
            }
        }
public T Remove ( ) { lock ( HeapLock . Mutex ) { if ( Count == 0 ) return default ; var topItem = _list [ 1 ] ; _list [ 1 ] = _list [ Count ] ; _list . RemoveAt ( Count ) ; TrickleDown ( 1 ) ; return topItem ; } }
Removes the bottom item from the binary heap.
Removes the bottom item from the binary heap .
None