Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for siftDownCmpFunc (0.22 sec)

  1. src/slices/zsortanyfunc.go

    		for j := i; j > a && (cmp(data[j], data[j-1]) < 0); j-- {
    			data[j], data[j-1] = data[j-1], data[j]
    		}
    	}
    }
    
    // siftDownCmpFunc implements the heap property on data[lo:hi].
    // first is an offset into the array where the root of the heap lies.
    func siftDownCmpFunc[E any](data []E, lo, hi, first int, cmp func(a, b E) int) {
    	root := lo
    	for {
    		child := 2*root + 1
    		if child >= hi {
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 23:33:29 UTC 2023
    - 12.8K bytes
    - Viewed (0)
Back to top