We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Not sure if this is a good name for it. We do a lot of fetching an array from the top of the heap (priority queue).
def top(max) results = [] while results.size < max and size > 0 do results << pop end results end
If you think it's a good idea, I'll make a proper pull request with a UT.
The text was updated successfully, but these errors were encountered:
@dblock A good name for this might be take because it looks like this works same way as Array#take.
take
Array#take
Sorry, something went wrong.
@GarrisonJ this is such an obvious and excellent answer, thank you
No branches or pull requests
Not sure if this is a good name for it. We do a lot of fetching an array from the top of the heap (priority queue).
If you think it's a good idea, I'll make a proper pull request with a UT.
The text was updated successfully, but these errors were encountered: