| 3567 | } |
| 3568 | |
| 3569 | void _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 | |
| 3584 | int64_t _partition(struct address_value *arr, int64_t n) { |
| 3585 | struct address_value pivot; |