Menu

#1 Find any shortest matching prefix function

open
nobody
None
5
2006-04-26
2006-04-26
No

Is it possible with HAMT, to *efficiently* find
any item, which has the shortest possible partial
key match.

Example:

(just ignoring the data being stored, and
examining the behaviour with respect to the keys):

With stored Keys:
"abc"
"abcde"
"abcdf"

findAnyShortestPrefix("ab") -> "abc"
findAnyShortestPrefix("abcd") -> "abcde" OR "abcde"
(either would be ok)
findAnyShortestPrefix("abcde") -> "abcde"

Thanks for a great package :-)

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.