Skip to content

Commit 3c29666

Browse files
committed
Lab work finishedgit add .! Freezing all tasksgit add .!
1 parent 7565f10 commit 3c29666

File tree

100 files changed

+1766
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1766
-12
lines changed

Lab1/3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ scanf("%s",PATTERN);
3333
start=clock();
3434
pos = search(TEXT,PATTERN,n,m);
3535
end=clock();
36-
t=(double)(start-end)/CLOCKS_PER_SEC;
36+
t=(double)start-end/CLOCKS_PER_SEC;
3737
printf("The element is found at %d index\n",pos);
3838
printf("The time taken is %f\n",t);
3939
}

Lab1/3.exe

130 KB
Binary file not shown.

Lab1/3.png

13.8 KB
Loading

Lab1/Lab1.docx

17.5 KB
Binary file not shown.

Lab1/bubble.png

17.2 KB
Loading

Lab1/bubbleandselection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ B[i]=A[i];
5151
st = clock();
5252
bubble_sort(A,n);
5353
en= clock();
54-
t= double(en-st)/CLOCKS_PER_SEC;
54+
t= (double)en-st/CLOCKS_PER_SEC;
5555
printf("Time taken for Bubble sort is :%f \n",t);
5656
st = clock();
5757
selection_sort(B,n);
5858
en=clock();
59-
t= (double)(en-st)/CLOCKS_PER_SEC;
59+
t= (double)en-st/CLOCKS_PER_SEC;
6060
printf("Time taken for Selection sort is :%f \n",t);
6161
return 0;
6262
}

Lab1/bubbleandselection.exe

130 KB
Binary file not shown.

Lab1/linearsearch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ scanf("%d",&el);
3131
start=clock();
3232
flag=linearsearch(A,el,n);
3333
end=clock();
34-
time = (double)(start-end)/CLOCKS_PER_SEC;
34+
time = (double)start-end/CLOCKS_PER_SEC;
3535
if(flag==1)
3636
printf("The element exists in the array");
3737
else

Lab1/linearsearch.exe

130 KB
Binary file not shown.

Lab1/linearsearch.png

17.7 KB
Loading

0 commit comments

Comments
 (0)