artem
Advanced Member level 4
Hi guys
I have got the task where single string has to be matched and it is identifier must be returned . Implementation via binary tree is not acceptable as it takes memory a lot . Hashing can be done but the problem is that set of string is undertermined and can be changed during live program execution , so I have to maintain flexible collision list for hashing algorithm .
Could someone recommend hash function with predetermined number of collisions for undetermined number input elements (strings) where string length can vary in range 2-32 characters . There could be up to 300 strings to be matched and algorithm must be quick enough to handle matching in real time . String length can vary between 2- 32 characters .
Special literature for hashing will also be appreciated .
Current implementation uses hybrid n-sized tree with linked element list for each tree node where sequential search is done to find match for current n-th position character . This algorith has deterministic time for execution buit it is quite long and inefficient .
Thank you in advance
I have got the task where single string has to be matched and it is identifier must be returned . Implementation via binary tree is not acceptable as it takes memory a lot . Hashing can be done but the problem is that set of string is undertermined and can be changed during live program execution , so I have to maintain flexible collision list for hashing algorithm .
Could someone recommend hash function with predetermined number of collisions for undetermined number input elements (strings) where string length can vary in range 2-32 characters . There could be up to 300 strings to be matched and algorithm must be quick enough to handle matching in real time . String length can vary between 2- 32 characters .
Special literature for hashing will also be appreciated .
Current implementation uses hybrid n-sized tree with linked element list for each tree node where sequential search is done to find match for current n-th position character . This algorith has deterministic time for execution buit it is quite long and inefficient .
Thank you in advance