split_pointer_lists
- corsort.split_pointer_lists(n)[source]
Compute the indices of the boundaries for all the steps of bottom-up (BFS) merge sort.
- Parameters:
n (
integer
) – Size of the list.- Returns:
For each step, list of indices for the step.
- Return type:
Examples
>>> split_pointer_lists(n=9) [array([0, 4, 9]), array([0, 2, 4, 6, 9]), array([0, 1, 2, 3, 4, 5, 6, 7, 9]), array([0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 9])]