You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fix is to explicitly add the appropriate return type to the method declaration.
Second, the current algorithm for creating a priority queue from initial elements inserts the elements one at a time. This takes O(N log N) time. Substituting the well-known "heapify" algorithm would improve this to O(N) time. Similar improvements can be made to enqueue, ++=, and reverse.
I am currently working on implementing these changes.
The text was updated successfully, but these errors were encountered:
@szeiger said:
The sequential, single-append nature of Builders is also a limitation in https://github.com/scala/scala-java8-compat. It would be great if we could create a more powerful abstraction for Scala 2.13 collections.
First, the newBuilder function in object PriorityQueue is defined as
The lack of a return type means that the type in the API comes out as
rather than the expected
The fix is to explicitly add the appropriate return type to the method declaration.
Second, the current algorithm for creating a priority queue from initial elements inserts the elements one at a time. This takes O(N log N) time. Substituting the well-known "heapify" algorithm would improve this to O(N) time. Similar improvements can be made to enqueue, ++=, and reverse.
I am currently working on implementing these changes.
The text was updated successfully, but these errors were encountered: