You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: prevent remove() crash on stale undefined/zero slots in all PQ types
- PriorityQueue.remove(): add node && null-guard in findIndex (fixes
TypeError crash when _elements contains undefined slots from prior
dequeue/pop or _grow calls)
- TypedPriorityQueue.remove(): replace findIndex with bounded loop
limited to _size to avoid matching stale zero-filled slots
- StableTypedPriorityQueue.remove(): same bounded-loop fix
- TypedPriorityQueue.indexOf() and StableTypedPriorityQueue.indexOf():
same bounded-loop fix for consistency
- Add regression tests for dequeue-then-remove across all 4 PQ types
- Regenerate docs
Co-authored-by: Copilot <[email protected]>
</div><div><divclass="space-y-7" id=""><divclass="markdown"><p>A type representing a comparison function that determines the order of two elements.</p>
</div><div><divclass="space-y-7" id=""><divclass="markdown"><p>Represents a node in a priority queue that extends a basic Node type with priority information.</p>
0 commit comments