0% found this document useful (0 votes)
2 views

CCP

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

CCP

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Data Structures and Algorithms (DSA)

Complex Computing Programming Assignment

Submitted by:
Abdullah Khan 2023-CS-718

Ahmad Wahab 2023-CS-746

Submitted to:
Ma’am Darakshan

Dated: 13th December, 2024.

Department of Computer Science


University of Engineering and Technology Lahore, New Campus.
Table of Contents
Selection Sort............................................................................................................................................................................................................... 3
Graph:.......................................................................................................................................................................................................................... 3
Insertion Sort............................................................................................................................................................................................................... 4
Graph:.......................................................................................................................................................................................................................... 4
Bubble Sort.................................................................................................................................................................................................................. 5
Graph:.......................................................................................................................................................................................................................... 5
Merge Sort................................................................................................................................................................................................................... 6
Graph:.......................................................................................................................................................................................................................... 6
Quick Sort.................................................................................................................................................................................................................... 7
Graph:.......................................................................................................................................................................................................................... 7
Heap Sort..................................................................................................................................................................................................................... 8
Graph:.......................................................................................................................................................................................................................... 8
Counting Sort............................................................................................................................................................................................................... 9
Graph:.......................................................................................................................................................................................................................... 9
Selection Sort

Input Size 1000 2000 3000 4000 5000 10000 2000 40000 80000 100000 150000 200000 250000 500000
[n] 0
Execution 0.0020 0.0082 0.016 0.032 0.036 0.144 0.546 2.16 8.74 13.48 30.92 54.20 93.5 346.34
Time
Machine
A (sec)
Execution 0.0026 0.0107 0.0209 0.0418 0.0471 0.1883 0.714 2.824 11.42 17.62 40.43 70.87 122.26 452.90
Time
Machine
B (sec)
Graph:
Insertion Sort

Input Size 1000 2000 3000 4000 5000 10000 20000 4000 80000 100000 150000 200000 250000 500000
[n] 0

Execution 0.0082 0.009 0.0098 0.013 0.031 0.080 0.28 1.11 4.62 8.11 17.39 29.95 44.38 183
Time 1
Machine
A (sec)
Execution 0.010 0.011 0.012 0.0167 0.0407 0.1047 0.366 1.451 6.015 10.60 22.80 39.17 58.27 240.22
Time
Machine
B (sec)

Graph:
Bubble Sort

Input 1000 2000 3000 4000 5000 1000 2000 4000 8000 10000 15000 20000 25000 500000
Size [n] 0 0 0 0 0 0 0 0
Executio 0.0049 0.022 0.052 0.087 0.130 0.52 2.14 8.52 34.24 54.94 117.88 216.6 341.46 1308.97
n Time
Machine
A (sec)
Executio 0.006 0.02 0.06 0.10 0.16 0.65 2.69 10.7 43.0 69.19 148.3 272.5 430.3 1646.2
n Time 2 7 5 9 3 5 5 3 9 4 4 5 1
Machine
B (sec)

Graph:
Merge Sort

Input 1000 2000 3000 4000 5000 10000 2000 4000 8000 100000 15000 20000 25000 500000
Size [n] 0 0 0 0 0 0
Executio 0.0094 0.0027 0.0030 0.0047 0.0030 0.0079 0.011 0.017 0.027 0.036 0.065 0.096 0.115 0.288
n Time
Machine
A (sec)
Executio 0.011 0.003 0.003 0.0057 0.004 0.009 0.013 0.020 0.032 0.043 0.078 0.116 0.139 0.349
n Time 4 3 6 0 6
Machine
B (sec)

Graph:
Quick Sort

Input 1000 2000 3000 4000 5000 10000 20000 4000 8000 10000 15000 20000 25000 50000
Size [n] 0 0 0 0 0 0 0
Executio 0.0052 0.0067 0.0030 0.0074 0.0080 0.0079 0.008 0.024 0.048 0.078 0.160 0.250 0.398 1.485
n Time 8
Machine
A (sec)
Executio 0.006 0.008 0.003 0.009 0.009 0.009 0.010 0.03 0.05 0.088 0.181 0.303 0.483 1.802
n Time 3 1 6 0 7 9 0 6
Machine
B (sec)
Graph:
Heap Sort
Input Size 1000 2000 3000 4000 5000 10000 20000 40000 80000 100000 150000 200000 250000 500000
[n]
Execution 0.0014 0.0079 0.0036 0.0050 0.0071 0.0086 0.0090 0.021 0.0362 0.0470 0.0732 0.0998 0.106 0.239
Time 0
Machine
A (sec)
Execution 0.0017 0.0090 0.0044 0.0061 0.0086 0.010 0.011 0.025 0.043 0.057 0.088 0.121 0.128 0.290
Time
Machine
B (sec)

Graph:
Counting Sort
Input 1000 2000 3000 4000 5000 10000 20000 40000 80000 10000 15000 20000 25000 50000
Size [n] 0 0 0 0 0
Executio 0.0007 0.0008 0.0009 0.0009 0.0010 0.0039 0.0010 0.0013 0.0014 0.0039 0.0091 0.003 0.0080 0.0234
n Time 6 9
Machine
A (sec)
Executio 0.000 0.001 0.0012 0.0013 0.002 0.004 0.001 0.001 0.001 0.005 0.011 0.004 0.009 0.028
n Time 8 0 0 7 2 6 9 1 5 7 4
Machine
B (sec)
Graph:

You might also like