Babak Ayoughzadeh Rashidi: Data Structure & Analysis of Algorithm
Babak Ayoughzadeh Rashidi: Data Structure & Analysis of Algorithm
Babak Ayoughzadeh Rashidi: Data Structure & Analysis of Algorithm
Assignment
A B C D E F G H I K L M N O P Q R S T U V W Y 0 1 7 8 9 Sp ‘ , . “ ”
1st 7 1 1 8 1 3 3 1 1 7 2 1 1 2 6 6 1 1 2 9 1 2 2
2nd 2 1 1 3 9 1 6 1 1 5 5 3 5 3 7 2 1 1 10 1 1 1 1 1
3rd 7 1 6 3 2 1 3 1 6 3 2 1 2 4 2 2 2 1 1 7 3
4th 8 1 4 7 4 7 2 1 5 3 2 1 4 5 1 1 1 1 8 2 1
5th 6 2 1 3 1 1 3 4 3 2 4 5 2 3 1 6 2 1 3 2 1 1 1 10 1 2
6th 1 1 2 1 2 1 1 2 1 1 2 2 1 1 2 1
total 31 2 8 10 35 1 2 12 23 4 10 6 29 19 10 3 17 21 24 7 5 5 5 3 2 1 1 1 46 2 7 5 3 3
46
E A N T I S R H D L
10 8 7 7 6 5 5 5 5 4
P C U , M V Y W . K
3 3 3 3 2 2 2 2 1 1
Q 0 ‘ ’ B G 1 ‘ F 7
1 1
8 9
2) 1ST MERGE
47 25 24 23 22 22 19 18 14 13
SP
H
K2
10 W
D
T29 1U
2E8 C
22
7I F‘2
6R PS2
4, G
AX31 M
1Z3O 07
1L3 N
4.1
3
2
T1
1 1
6 8
3) 2nd MERGE
H
K2
10 W
D29 1U
28 C
22
7 F‘2
6 P2
4, G
X31 M
1Z3 07
13 4.1
3
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L N
10 9 8 7 6 4 3 3 3 3
H D U C F P G M 7 .
2 2 2 2 2 2 2 1 1
T1
K W 1 2 ‘ , X Z
1 1
6 8
2
T2
1 1
4) 3rd MERGE
0 4
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L N
10 9 8 7 6 4 3 3 3 3
H D U C F P G M 7 .
2 2
T2 T1 2 2 2 2 2 2
1 1 1 1 ‘
K W 1 2 ,
0 4 6 8
2
T3
1 1
5) 4th MERGE
x z
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L N
10 9 8 7 6 4 3 3 3 3
H D U C F P G M 7 .
2 2 2
T3 T2 T1
2 2 2 2
1 1 1 1 1 1
K W 1 2
X Z 0 4 6 8
4
T4
6) 5TH MERGE
2 2
‘ ,
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L N
4
10 9 8 7 6 4 3 3
T4
H D U C F 2 2 P G M
‘ ,
2 2 2
3 3 2 2
T3 T2 T1
7 . 1 1 1 1 1 1 K W
X Z 0 4 6 8
4
T5
2 2
7) 6TH MERGE
1 2
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L N
4 4
10 9 8 7 6 T5 T4 4 3
2 2 2 2
H D U C F P G
1 2 ‘ ,
3 2 2 2
3 3
T3 T2 T1
M 7 . 1 1 1 1 1 1
X Z 0 4 6 8
4
T6
2 2
8) 7TH
K MERGE
W
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L N
4 4 4
10 9 8 7 6 T6 T5 T4
2 2 2 2 2 2
H D U C F
K W 1 2 ‘ ,
4 3 3 3 3 2
T3
P G M 7 .
1 1
4
X Z T7
2 2
T2 T1
9) 8TH MERGE
1 1 1 1
0 4 6 8
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L
N
4 4
4
10 9 8 7 6 T6 T5
T7
H D U C F
K W 1 2
T2 T1
0 4 6 8
4
5
T4
4 3 3 3 T8
3
P G M 7
‘ ,
.
2
T3
10)9 TH MERGE 1 1
X Z
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L N
10 9 8 7 6 5 4
4
T7 T6
H D U C F T8
T3 T2 T1 K W
.
X Z 0 4 6 8
4 4
T5 T4
4 3
6
P G T9
1 2 ‘ ,
3 3
M 7
11) 10TH MERGE
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L N
4
10 9 8 7 6 6 5
T7
H D U C T9 F T8
T3 T2 T1
M 7
.
X Z 0 4 6 8
4 4 4
T6 T5 T4 7
T10
K W 1 2 ‘ ,
4 3
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L
N
10 9 8 7 7 6 6 5 4
H D U T10 C T9 F T8 T7
T2 T1
P G M 7 . T3
0 4 6 8
X Z
8
4
T11
T6
T5 T4
K W
1 2 ‘ ,
SP T E I R S A O L N
10 9 7
8 8 7 6 6 5
H D T11 T10
U C T9 F T8
T4 T3
T5 P G M 7 .
1 2 ‘ , X Z
T12
T7
T6
T2 T1
14) 13TH MERGE
K W
0 4 6 8
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L N
10 8 8 7
9 8
T12 T11
H D U T10
T7
T4
T5
P G
T6
T2 T1 1 2 ‘ ,
K W
0 4 6 8 11
T13
7 6
5 6
C T9
T8 F
15)14TH MERGE T3
M 7
.
X Z
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L N
11 10 9 8 8 8 7
T12 T11
T13 H D U T10
T7 T4
T6 T5
F P G
T8
K W T2 T1 1 2 ‘ ,
. T3
0 4 6 8
X Z
13
T14
6 7
T9 C
16)15TH MERGE
M 7
47 25 24 23 22 22 19 18 14 13
SP T E I R S A O L T14
T9 C
13 11 M 7
10 9
8
N T13 H D T12 8 T11
T7 T4
F T6 T5
T8
K W T2 T1 1 2 ‘ ,
. T3
0 4 6 8
X Z 15
T15
7 8
T15
P G
T10 G U
P
47 25 24 23 22 22 19 18
SP T E I R S A
O
14 13 13 11 10 9
L T14 N T13 H D
T9 C
F
T8
M 7 16
. T3
T16
X Z
8 8
T12 T11
T7 T4
T6 T5
16
5 5
18) 17TH MERGE
K W T2 T1 1 2T16 ‘ ,
8
0 4 6 8
24 23 22 22 19 18 T11
47 25
SP T E I R S A O T5 T4
5
1 2
15 T12 ‘
14 13 13 ,
T15
L T14 N T7
T6
5
T10 U T9 C K W T2 T1
M 7
P G 0 4 6 8
11 19
T13 T17
F
T8 10 9
19)18TH MERGE H 19
T3 D
.
T17
X Z
47 25 24 23 22 22 19 18
SP T E I R S A O
H D
16
15
T16 14 13
T15
T11 L T14
T5 T4 T10 U T9 C
5
1 2 M 7
T12
‘ , 24
P G
T7 T18
T6
5
K W T2 T1
T13
N
0 4 6 8 T8 F
T17
23 22 22 19 18
X Z
I R S A O
H D
24 24
47 25
SP T T18
E
T13 N
T8
F
. T3
X Z
27
16
T19
T16 15
T11 14
13
T15
T5 T4 L
T14
5
T12
1 2
T10 U T9 C
‘ ,
T7
T6 M 7
5 21) 20TH MERGE P G
K W T2 T1
0 4 6 8
24 23 22 22 19 19 18
25 24
47 27
E I R S A O
T19 T T18 T17
SP
T13 N
T14 L
T8 H D
F
T9 C
. T3 31
M 7
T20
X Z
15 16
T15 T16
T11
T5 T4
T10 5
U
T12
1 2
‘ ,
P G T725 24
27T6
5
22) 21th MERGE T19 T T18
K W T2 T1
L T13 N
T14
0 4 6 8
T8
T9 7 C . X T3 Z F
47 31
SP T20
T16
T11
T15
M
T5 T4
5
T10 T12
U 1 2
‘ ,
T7
P G T6
5
K W T2 T1
0 4 6 8
37
T21
24 23 22 22 19
E I R S T17 31
A O 27
23) 22TH MERGE T20
T19
H D
T16
T11
T15 T14 L
T10
P G K U T6W 0T12 T24T7 T5 2
1 6 T1 8‘ T4 , M T9 7 C
47 37
SP T21
A O
41
25 24 24 23 22
T22
T T18 E I R
22 19
T13 N
T8 S T17
F
TH
24) 23 MERGE
. T3
31 H D
X Z 27
T20
T19
T10
P G T15 K U T6W 0T12
T16 T24T7 T5 2 T118 ‘
1 6 T1 T4 , M T9 7 CL
37
47 41
T21
SP
T22
A O T14
S T17
H D
25 24 24
T T18 E
45
T13 N T23
T8
31
25) 24TH MERGE
F 23 22
. T3 37 T20
I R
X Z T16
T11
T10 T15
P G K U T6W 0T12 T2 4T7 T5 2
1 6 T1 8‘ T4 ,
47 45 41
T21
T23
SP T22
A O
I R S T17
H D
48
27 25 T24
24 24
T19 T
E T18
T14 L
T13 N
T9 C
T8
th
26)
7
25 MERGE F
M 37
. T3 41
45
T23 X Z
I R
48 47
T21
T24 T22
SP
A O
E T18
S T17
T13 N
T8 H D
F 31
. T3
T20
X Z 52
T16
T11
T15 T25
T5 T4
5
25 27
T10 T12
U 1 2
‘ , T T19
T7
P G T6
5 L
T14
TH 48
27) 26 MERGE K W T2 T1 47 45 41
52 T24 T9 C
SP T23 T22
0 4 6 8 7
M
E T18
F N I R S H D
. T8X T3T13 Z T17
T25
T19
T14 L
68
T9 C
31 T26
7
M 37
T20
T21
T16
T11
T15
T5 A O
T4
5
T10 T12
U 1 2
‘ ,
T7
P 68 G T6 48
TH
28)27 MERGE 5
T26 52 T24
K W T2 T1
0 4 6 8
T10 T18
P G T15 K U T6W 0T12
T16 T24T7 T5 2 T118 ‘
1 6 T1 T4A , O . T8X T3T13 Z F N
T21 T25
T20
E
T T19
T14 L
T9 C
7
M
86
T27
41 45
T22 T23
68
T26
47 TH
29)28 MERGE S T17 I R
T20 T21
SP
H T16 D T11
T15
T10 A O
P G K U T6W 0T12 T2 4T7 T5 2
1 6 T1 8‘ T4 ,
86
T27
T22
T23
S T17
I R
95
H D
T28
48
52 47
T24
T25 SP
T18
T19
E
T13 N
T
T14 L
86 T8
F
30) 29TH MERGE
T9 C T27
. T3
T23
7
M X Z
95
T22
T28
I R
S T17
SP T24 120
H D T29
T18
E
68
N
T13 T26
T8
F T20 T21
. T3
52 T15
T16 A
X Z O
T25 T10
U
T T29 T7 T5 T4
T6
T14 L 5
5 T26
31) 30th MERGE 1 2
T2 T1 T21
K W T20 ‘ ,
T9 C
T25
7 T16 O
M T15 0 4 6 8 A
T L T10 U
T6W 0 T12 T7 6 T1 1 8 T5 2 T11 ‘
M T9 7T14 T19 GK T24 T4 ,
P
181
C
T30
95
T28
T24
86 SP
T18
T27
E
N
“ T23 T13
T22
T8
32) 31TH MRGE
I R F363
S T17
. T3
209
H D X Z
154 116
71
93
54 62
E 36 83
SP 47
40 25 N 3 A
R O 43 I T 1
1 1
20 5 6
12 13
20 S 22 , 8 8 C
L
P
6 4 4 K 4
‘
D 10 H
10 M 6 U
B 2 1 G 2
Y V “
. W 0 7 9 F 8