#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
|
void | q_sort (double numbers[], int left, int right) |
|
void | quickSort (double numbers[], int array_size) |
|
§ q_sort()
void q_sort |
( |
double |
numbers[], |
|
|
int |
left, |
|
|
int |
right |
|
) |
| |
Definition at line 61 of file quick.c.
Referenced by quickSort().
64 double l_hold, r_hold;
68 pivot = (int) numbers[left];
71 while ((numbers[right] >= pivot) && (left < right))
75 numbers[left] = numbers[right];
78 while ((numbers[left] <= pivot) && (left < right))
82 numbers[right] = numbers[left];
86 numbers[left] = pivot;
91 q_sort(numbers, left, pivot-1);
93 q_sort(numbers, pivot+1, right);
void q_sort(double numbers[], int left, int right)
§ quickSort()
void quickSort |
( |
double |
numbers[], |
|
|
int |
array_size |
|
) |
| |
Definition at line 54 of file quick.c.
References q_sort().
56 q_sort(numbers, 0, array_size - 1);
void q_sort(double numbers[], int left, int right)