 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| |
Total time is now O(b+m2n) instead of O(m2n2)
|
|
|
|
|
|
|
b is
the number of bins
|
|
|
|
|
Note: m
is small; n is big
|
|
|
| |
But
we have lost accuracy and the array of bins can
|
|
|
be
expensive
|
|
|
|
|
Can be
a very large array
|
|
|
|
|
Most
bins are empty anyway
|
|
|
|
|
Note:
could use a bit-array, but its still large
|
|