Skip to content

Conversation

macbellingrath
Copy link
Contributor

Checklist

Description

The documentation of

insert<S: Sequence>(_ sequence: S) where S.Iterator.Element == T

states that the time complexity of this method is O(log n). This is not correct as it calls this method

insert(_ value: T) // time complexity of O(log n)

n times.

The overall complexity is thus O(n log n)

@macbellingrath macbellingrath changed the title Fix Time Complexity Documentation for insertion of Sequence into Heap Fix time complexity documentation for insertion of Sequence into Heap Oct 16, 2018
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