السلام عليكــم ورحمـة الله وبركاتــة
السؤال
int LinearSearch( int a[], int n, int key) {
for (i = 0; i < n; i++)
{
if (key == a )
return i; //return the position
}
return -1; //-1 means not found
}
Qustion:
Write a program that uses the above function and draw a relation
between n and the execution time for n= 10000 to 100000 step 10000.
[Hint: Fill the array with random numbers, and use the <ctime> header
file, the time_t type, and time( ) to get the computer execution time.]
اللي يحله له دعااااااااااااااااء مني ورالله ماارااح بس بليز يكون اليوم
