Fagin's algorithm: Fagin's algorithm: 1. Do sorted access on all lists in parallel. 2. For every item - do random access to the other lists to fetch all of its values. 3. Stop when at least K items were seen in the sorted access. 4. Sort the list.
Fagin's algorithm: Fagin's algorithm: 1. Do sorted access on all lists in parallel. 2. For every item - do random access to the other lists to fetch all of its values. 3. Stop when at least K items were seen in the sorted access. 4. Sort the list.