arrays - Search Algorithm with Incomplete Input -


i need algorithm search array string, string may not same 1 of items in array. example,

array = {"stack", "over", "flow", "stake"} input = "sta" 

it need recognize stack , stake both match parameters , choose 1 first in alphabetical order. how can this?

loop on sorted array, compute levenshtein distance between each string , target string, , if sufficiently small, return.

what constitutes "sufficiently small" you. you'll have testing.


Comments

Popular posts from this blog

Java sticky instances of class com.mysql.jdbc.Field aggregating -