solidstate-solidity
solidstate-solidity copied to clipboard
Binary Heap
The Binary Heap is commonly used for priority queues with applications in DeFi such as a DEX order book. This data structure is partially sorted, therefore only the root node is guaranteed to be in the correct order. This is particularly useful in cases where only the first entry in the queue is needed per transaction. The Binary Heap should have a generalized implementation.