Skip to content

FIX: adding upcoming elements to the heap, after first k ones.#252

Open
lyteabovenyte wants to merge 1 commit intoadnanaziz:masterfrom
lyteabovenyte:patch-1
Open

FIX: adding upcoming elements to the heap, after first k ones.#252
lyteabovenyte wants to merge 1 commit intoadnanaziz:masterfrom
lyteabovenyte:patch-1

Conversation

@lyteabovenyte
Copy link
Copy Markdown

we've already added first k elements to the heap, so it's needed to read the sequence from k to the end and skip already added elements to avoid duplicate elements in result.

we've already added first k elements to the heap, so it's needed to read the sequence from k to the end and skip already added elements to avoid duplicate elements in result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant