Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeKSortedLists ¶
MergeKSortedLists merges K-sorted lists into a single list Runtime is O(K*(K*N)) = O(K^2*N) assuming each list of is length N Space is O(K) for the indicies without considering the answer list of O(K*N) size. Use this if K is very small
func MergeKSortedListsUsingHeap ¶
MergeKSortedListsUsingHeap merges K-sorted lists into a single list using a min-heap. Runtime is O(N*K log K) assuming each list of is length N Space is O(K) for the heap without considering the answer list of O(K*N) size. Use this if K is very large.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.