data structures - Efficiently implementing search algorithm for a list of strings which can be similar -
i dont know how put this. give 1 example. having list of strings, {"abc-1","abc-2","abc-3",abc-4", "xyz-98","xyz-76","xyz-34","xyz-87" "foo-1a","foo-1b","foo-1c"} hope got picture of problem. algorithm best kind of scenario can have similar strings of large number. or may how can optimize existing algorithm achieve best performance?
optimize what? speed or size. if list small enough , looking exact matches map (hashmap / hashtable) work take amount of space. use trie (prefix tree) space on space , allow prefix matching slower map.
Comments
Post a Comment