MCPcopy Create free account
hub / github.com/albertobsd/keyhunt / _insertionsort

Function _insertionsort

keyhunt.cpp:3569–3582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3567}
3568
3569void _insertionsort(struct address_value *arr, int64_t n) {
3570 int64_t j;
3571 int64_t i;
3572 struct address_value key;
3573 for(i = 1; i < n ; i++ ) {
3574 key = arr[i];
3575 j= i-1;
3576 while(j >= 0 && memcmp(arr[j].value,key.value,20) > 0) {
3577 arr[j+1] = arr[j];
3578 j--;
3579 }
3580 arr[j+1] = key;
3581 }
3582}
3583
3584int64_t _partition(struct address_value *arr, int64_t n) {
3585 struct address_value pivot;

Callers 1

_introsortFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected