Skip to content

Rework example 7 and provide an alternative way of solving the problem.#118

Open
vosst wants to merge 1 commit intocareercup:masterfrom
vosst:master
Open

Rework example 7 and provide an alternative way of solving the problem.#118
vosst wants to merge 1 commit intocareercup:masterfrom
vosst:master

Conversation

@vosst
Copy link
Copy Markdown

@vosst vosst commented Jul 7, 2015

While browsing through the example questions, I kind of got stuck at 11.7 and its proposed solution. After a bit of research, I came up with an alternative way of solving the problem using a heap (T: O(n log(n)), S: O(1)), leaving the original approach relying on a sorted collection in place.

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