-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_redir1.txt
227 lines (191 loc) · 10.1 KB
/
run_redir1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
valgrind --leak-check=full ./a.out < redir1.txt > run_redir1_auto.txt
==92== Memcheck, a memory error detector
==92== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==92== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==92== Command: ./a.out
==92==
Part 1 - edit distance table
Repeatedly enter two words separated by a space (e.g.: cat someone).
Stop with: -1 -1
first: dog
second: DoG
| | D| o| G|
-------------------
| 0| 1| 2| 3|
-------------------
d| 1| 1| 2| 3|
-------------------
o| 2| 2| 1| 2|
-------------------
g| 3| 3| 2| 2|
-------------------
edit distance: 2
=========================================================================================
first: cs
second: cat
| | c| a| t|
-------------------
| 0| 1| 2| 3|
-------------------
c| 1| 0| 1| 2|
-------------------
s| 2| 1| 1| 2|
-------------------
edit distance: 2
=========================================================================================
first: someone
second: cat
| | c| a| t|
-------------------
| 0| 1| 2| 3|
-------------------
s| 1| 1| 2| 3|
-------------------
o| 2| 2| 2| 3|
-------------------
m| 3| 3| 3| 3|
-------------------
e| 4| 4| 4| 4|
-------------------
o| 5| 5| 5| 5|
-------------------
n| 6| 6| 6| 6|
-------------------
e| 7| 7| 7| 7|
-------------------
edit distance: 7
=========================================================================================
first: cat
second: someone
| | s| o| m| e| o| n| e|
-----------------------------------
| 0| 1| 2| 3| 4| 5| 6| 7|
-----------------------------------
c| 1| 1| 2| 3| 4| 5| 6| 7|
-----------------------------------
a| 2| 2| 2| 3| 4| 5| 6| 7|
-----------------------------------
t| 3| 3| 3| 3| 4| 5| 6| 7|
-----------------------------------
edit distance: 7
=========================================================================================
first: someone
second: something
| | s| o| m| e| t| h| i| n| g|
-------------------------------------------
| 0| 1| 2| 3| 4| 5| 6| 7| 8| 9|
-------------------------------------------
s| 1| 0| 1| 2| 3| 4| 5| 6| 7| 8|
-------------------------------------------
o| 2| 1| 0| 1| 2| 3| 4| 5| 6| 7|
-------------------------------------------
m| 3| 2| 1| 0| 1| 2| 3| 4| 5| 6|
-------------------------------------------
e| 4| 3| 2| 1| 0| 1| 2| 3| 4| 5|
-------------------------------------------
o| 5| 4| 3| 2| 1| 1| 2| 3| 4| 5|
-------------------------------------------
n| 6| 5| 4| 3| 2| 2| 2| 3| 3| 4|
-------------------------------------------
e| 7| 6| 5| 4| 3| 3| 3| 3| 4| 4|
-------------------------------------------
edit distance: 4
=========================================================================================
first: abcdefyyy
second: wwabudef
| | w| w| a| b| u| d| e| f|
---------------------------------------
| 0| 1| 2| 3| 4| 5| 6| 7| 8|
---------------------------------------
a| 1| 1| 2| 2| 3| 4| 5| 6| 7|
---------------------------------------
b| 2| 2| 2| 3| 2| 3| 4| 5| 6|
---------------------------------------
c| 3| 3| 3| 3| 3| 3| 4| 5| 6|
---------------------------------------
d| 4| 4| 4| 4| 4| 4| 3| 4| 5|
---------------------------------------
e| 5| 5| 5| 5| 5| 5| 4| 3| 4|
---------------------------------------
f| 6| 6| 6| 6| 6| 6| 5| 4| 3|
---------------------------------------
y| 7| 7| 7| 7| 7| 7| 6| 5| 4|
---------------------------------------
y| 8| 8| 8| 8| 8| 8| 7| 6| 5|
---------------------------------------
y| 9| 9| 9| 9| 9| 9| 8| 7| 6|
---------------------------------------
edit distance: 6
=========================================================================================
first: dfsasfdjasdfjhGDFJAS
second: dssasdtfuywetuyftdweuytdfwiuy
| | d| s| s| a| s| d| t| f| u| y| w| e| t| u| y| f| t| d| w| e| u| y| t| d| f| w| i| u| y|
---------------------------------------------------------------------------------------------------------------------------
| 0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29|
---------------------------------------------------------------------------------------------------------------------------
d| 1| 0| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27| 28|
---------------------------------------------------------------------------------------------------------------------------
f| 2| 1| 1| 2| 3| 4| 5| 6| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27|
---------------------------------------------------------------------------------------------------------------------------
s| 3| 2| 1| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26| 27|
---------------------------------------------------------------------------------------------------------------------------
a| 4| 3| 2| 2| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25| 26|
---------------------------------------------------------------------------------------------------------------------------
s| 5| 4| 3| 2| 2| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24| 25|
---------------------------------------------------------------------------------------------------------------------------
f| 6| 5| 4| 3| 3| 2| 2| 3| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23| 24|
---------------------------------------------------------------------------------------------------------------------------
d| 7| 6| 5| 4| 4| 3| 2| 3| 4| 4| 5| 6| 7| 8| 9| 10| 11| 12| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23|
---------------------------------------------------------------------------------------------------------------------------
j| 8| 7| 6| 5| 5| 4| 3| 3| 4| 5| 5| 6| 7| 8| 9| 10| 11| 12| 13| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23|
---------------------------------------------------------------------------------------------------------------------------
a| 9| 8| 7| 6| 5| 5| 4| 4| 4| 5| 6| 6| 7| 8| 9| 10| 11| 12| 13| 14| 14| 15| 16| 17| 18| 19| 20| 21| 22| 23|
---------------------------------------------------------------------------------------------------------------------------
s| 10| 9| 8| 7| 6| 5| 5| 5| 5| 5| 6| 7| 7| 8| 9| 10| 11| 12| 13| 14| 15| 15| 16| 17| 18| 19| 20| 21| 22| 23|
---------------------------------------------------------------------------------------------------------------------------
d| 11| 10| 9| 8| 7| 6| 5| 6| 6| 6| 6| 7| 8| 8| 9| 10| 11| 12| 12| 13| 14| 15| 16| 17| 17| 18| 19| 20| 21| 22|
---------------------------------------------------------------------------------------------------------------------------
f| 12| 11| 10| 9| 8| 7| 6| 6| 6| 7| 7| 7| 8| 9| 9| 10| 10| 11| 12| 13| 14| 15| 16| 17| 18| 17| 18| 19| 20| 21|
---------------------------------------------------------------------------------------------------------------------------
j| 13| 12| 11| 10| 9| 8| 7| 7| 7| 7| 8| 8| 8| 9| 10| 10| 11| 11| 12| 13| 14| 15| 16| 17| 18| 18| 18| 19| 20| 21|
---------------------------------------------------------------------------------------------------------------------------
h| 14| 13| 12| 11| 10| 9| 8| 8| 8| 8| 8| 9| 9| 9| 10| 11| 11| 12| 12| 13| 14| 15| 16| 17| 18| 19| 19| 19| 20| 21|
---------------------------------------------------------------------------------------------------------------------------
G| 15| 14| 13| 12| 11| 10| 9| 9| 9| 9| 9| 9| 10| 10| 10| 11| 12| 12| 13| 13| 14| 15| 16| 17| 18| 19| 20| 20| 20| 21|
---------------------------------------------------------------------------------------------------------------------------
D| 16| 15| 14| 13| 12| 11| 10| 10| 10| 10| 10| 10| 10| 11| 11| 11| 12| 13| 13| 14| 14| 15| 16| 17| 18| 19| 20| 21| 21| 21|
---------------------------------------------------------------------------------------------------------------------------
F| 17| 16| 15| 14| 13| 12| 11| 11| 11| 11| 11| 11| 11| 11| 12| 12| 12| 13| 14| 14| 15| 15| 16| 17| 18| 19| 20| 21| 22| 22|
---------------------------------------------------------------------------------------------------------------------------
J| 18| 17| 16| 15| 14| 13| 12| 12| 12| 12| 12| 12| 12| 12| 12| 13| 13| 13| 14| 15| 15| 16| 16| 17| 18| 19| 20| 21| 22| 23|
---------------------------------------------------------------------------------------------------------------------------
A| 19| 18| 17| 16| 15| 14| 13| 13| 13| 13| 13| 13| 13| 13| 13| 13| 14| 14| 14| 15| 16| 16| 17| 17| 18| 19| 20| 21| 22| 23|
---------------------------------------------------------------------------------------------------------------------------
S| 20| 19| 18| 17| 16| 15| 14| 14| 14| 14| 14| 14| 14| 14| 14| 14| 14| 15| 15| 15| 16| 17| 17| 18| 18| 19| 20| 21| 22| 23|
---------------------------------------------------------------------------------------------------------------------------
edit distance: 23
=========================================================================================
first: B
second: b
| | b|
-----------
| 0| 1|
-----------
B| 1| 1|
-----------
edit distance: 1
=========================================================================================
first: -1
second: -1
Part 2 - spell check
Enter the dictionary file name: Enter the test file name: Could not open file bad. Exit
Good bye!
==92==
==92== HEAP SUMMARY:
==92== in use at exit: 0 bytes in 0 blocks
==92== total heap usage: 3 allocs, 3 frees, 8,664 bytes allocated
==92==
==92== All heap blocks were freed -- no leaks are possible
==92==
==92== For lists of detected and suppressed errors, rerun with: -s
==92== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)