File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -127,9 +127,9 @@ byte[][] compressedData = new byte[100000000][]; // Data for 100 million custome
127127SixBitBinarySearch binary = new SixBitBinarySearch (compressedData, false ); // false == exact-match search.
128128int index = binary. search(" key" );
129129```
130- It is important to note that ``` compressedData ``` does not need to be completely filled. It could have 70 million entries,
131- for example, and the binary search would still work. This is because the array of compressed data typically has extra space
132- to accommodate new entries (usually with some incremental ID implementation to avoid adding in the middle, but always at
130+ It is important to note that ``` compressedData ``` does not need to be completely filled. It could have 70 million entries
131+ and the binary search would still work. This is because the array of compressed data typically has extra space to
132+ accommodate new entries (usually with some incremental ID implementation to avoid adding in the middle, but always at
133133the end of the array), so unused slots (nulls) are placed at the end.
134134
135135A more realistic approach is to organize your data with a unique prefix (usually an ID) and search for it. For example,
You can’t perform that action at this time.
0 commit comments