4 ms·
It's easy to do searches on 74,000 numbers. Unpack them into an array and do binary search. No need for prefix trees when binary search will do just fine. Much
by pradn 5y ago
It's easy to do searches on 74,000 numbers. Unpack them into an array and do binary search. No need for prefix trees when binary search will do just fine. Much simpler, too. The unpacking process is trivial if the list is packed using the method described above, where diffs are stored, not whole numbers.