c++ - What is the best way to implement a threshold into a hash? -


i want implement following in c++:

  1. hash x(ballpark figure: 1 digit millions) 64 bit integers
  2. output elements occurrence >= y (user specified) binary file

right now, code hashes & outputs every element , not regard low occurrencies.

the obvious solution refactor code in way hashes not integer struct. contains integer , counter, checked being >=y before outputting elements binary file. bottomline memory footprint increase x*size_of(counter).

is there more sophisticated way of accomplishing task?


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -