voidGetLeastNumbers(int* input, int n, int* output, int k) { if(input == NULL || output == NULL || k > n || n <= 0 || k <= 0) return;
int start = 0; int end = n - 1; int index = Parttion(input, n, start, end); while(index != k -1) { if(index > k -1) { end = index - 1; index = Partition(input, n, start, end); } else { start = index + 1; index = Partition(input, n, start, end); } } for(int i = 0; i < k; ++i) output[i] = input[i];