Forum: C++ Nov 21st, 2004 |
| Replies: 3 Views: 2,287 Declare time variables like such
clock_t start, end;
start=clock();
end=clock();
cout<<"the total elapsed time is: "<<(end-start)/CLK_TCK<<"seconds"<<endl;
CLK_TCK is a predefined... |
Forum: C Nov 21st, 2004 |
| Replies: 1 Views: 1,976 Big O is a measure of compelexity.
Basically, in laymans terms, it means the highest amount of complexity an algorithm will contain.
Mathmatically, for me its easier to understand.
IE
in... |
Forum: C Oct 17th, 2004 |
| Replies: 12 Views: 9,174 Thats what I did, I found that the threshold value for the size of arrays I was dealing with would show increased efficiency at around 25 and lower. |
Forum: C Oct 15th, 2004 |
| Replies: 12 Views: 9,174 void quickSort(int numbers[], int array_size)
{
q_sort(numbers, 0, array_size - 1);
}
void q_sort(int numbers[], int left, int right)
{
int pivot, l_hold, r_hold; |
Forum: C Oct 15th, 2004 |
| Replies: 12 Views: 9,174 Recently we have been asked to create a hybrid sort based upon quicksorting down to a certain point and insertion sorting from then on. We are to calculate the efficency based upon previous tests. I... |