发明名称 MERGING OF SORTED LISTS USING ARRAY PAIR
摘要 The formulation of a merged sorted list from multiple input sorted lists in multiple phases using an array pair. Initially, the first array is populated with the input sorted lists. In the first phase, the first and second input sorted lists are merged into a first intermediary merged list within the second array. Each subsequent phase merges a prior intermediary merged list resulting from the prior phase and, a next input sorted list in the first array to generate a next intermediary merged list, or a merged sorted list if there or no further input in the first array. The intermediary merged lists alternate between the first array and the second array from one phase to the next phase.
申请公布号 US2016350341(A1) 申请公布日期 2016.12.01
申请号 US201615232273 申请日期 2016.08.09
申请人 MICROSOFT TECHNOLOGY LICENSING, LLC 发明人 Goldstein Jonathan David;Chandramouli Badrish
分类号 G06F17/30;G06F7/32 主分类号 G06F17/30
代理机构 代理人
主权项 1. A computing system comprising: one or more processors; and one or more hardware storage devices having stored computer-executable instructions which are executable by the one or more processors to implement a method for merging a plurality of sorted lists to form a merged sorted list, wherein the method includes: an act of accessing a plurality of sorted lists including a first sorted list and a second sorted list in a first array in memory; an act of establishing a first reference to a first element in the first sorted list in the first array; an act of establishing a second reference to the first element in the second sorted list in the first array; an act of formulating a second array in memory, the second array including at least a portion that includes a second plurality of elements equal in number to the first plurality of elements; an act of sequentially assigning values to the elements of the second plurality of elements to thereby formulated a first merged sorted list of the first and second sorted lists, the act of sequentially assigning comprising performing the following for each of the first element through a subsequent element in the secondary plurality of elements: an act of comparing a value at an element referenced by the first reference with a value at the element referenced by the second reference;if the value at the element referenced by the first reference satisfies a sorting priority with respect to the value at the element corresponding to the second reference, an act of populating the corresponding element of the second plurality of elements with the value at the element referenced by the first reference, and an act of causing the first reference to reference a next element in the first sorted list of the first plurality of elements if there are any further elements in the first sorted list, and if there are not any further elements in the first sorted list, the corresponding element of the second plurality of elements is the subsequent element of the second plurality of elements, and thus the method further includes an act of further populating a remainder of the second plurality of elements with any remaining unprocessed elements of the second sorted list from an element referenced by the second reference; andif the value at the element referenced by the first reference does not satisfy a sorting priority with respect to the value at the element referenced by the second reference, an act of populating the corresponding element of the second plurality of elements with the value at the element referenced by the second reference, and an act of causing the second reference to reference a next element in the second sorted list of the first plurality of elements if there are any further elements in the second sorted list, and if there are not any further elements in the second sorted list, the corresponding element of the second plurality of elements is the subsequent element of the second plurality of elements, and thus the method further includes an act of further populating a remainder of the second plurality of elements with any remaining unprocessed elements of the first sorted list from an element referenced by the first reference.
地址 Redmond WA US