-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
Go version
go version go1.21.1 openbsd/amd64
Issue
In the documentation of the Init function as well as the Interface interface and within the PriorityQueue example the term "heap invariants" is used. Maybe it is because I lack the academic background, but the term confused me when trying to understand the purpose of the Init function.
After some further reading I now understand, that it basically just means that the Init function establishes a correctly "sorted" heap from an "unsorted" input. I assume, that "sorting" is not the correct term to use and "establishing invariants" is a formally correct way to describe what Init does. However, I feel like easier language could be used to describe the function of Init and thus ease the understanding of the package.