例例:マージソート (2/2)
逐次的なマージソート
X, Y, Z
ix = 0, iy = 0, iz = 0
while (iz < n+m) {
if (comp(X[ix], Y[iy]) Z[iz++] = X[ix++]
else Z[iz++] = Y[iy++]
}
// 境界条件はcompがうまいことやってくれてることにします
これをどのように分割するのか?
11
22
input=300000000 wordCount=45788064
distinctWord=1129243 words=45788064
02528465 the
1 1564080 of
2 1219248 and
3 986168 in
4 862412 a
5 862356 to
6 507386 is
7 484451 The
8 445334 was
9 336005 for
10 334510 s
11 316207 as
12 295183 by
13 282728 with
14 281566 on
15 241960 that
16 235218 doc
17 221649 from
18 193797 at
19 189947 his
20 157175 an