nx_mergesort.nx
buildroot/runtime/nx_mergesort.nx
about
nx_mergesort.nx -- von-Neumann merge sort (top-down, stable).
genealogy_id: von_neumann_1945_edvac
lineage_id: stable_comparison_sort
references: von Neumann 'First Draft of a Report on the EDVAC', 1945.
Knuth TAoCP Vol 3 5.2.4.
license: public_domain
complexity: O(n log n) time worst-case, O(n) extra space.
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_mergesort_test.nxnx_triangulation_sort_string_graph.nx
structs
| none |
consts
| none |
functions
| 25 | func nx_mergesort_merge(arr: *nx_int, lo: nx_idx, mid: nx_idx, hi: nx_idx, called by 1: nx_mergesort_recur |
| 69 | func nx_mergesort_recur(arr: *nx_int, lo: nx_idx, hi: nx_idx, aux: *nx_int) -> nx_int |
| 80 | func nx_mergesort(arr: *nx_int, n: nx_idx) -> nx_int |