dimanche 8 février 2015

searching logic of dictianary app in android

I want to make Dictionary app ,main problem is what should we the logic of searching of words.I have tried for searching the logic is algorithm insert(root : node, s : string, value : any): node = root i = 0 n = length(s)



while i < n:
if node.child(s[i]) != nil:
node = node.child(s[i])
i = i + 1
else:
break

(* append new nodes, if necessary *)
while i < n:
node.child(s[i]) = new node
node = node.child(s[i])
i = i + 1

node.value = value.but could not get any good solution .

Aucun commentaire:

Enregistrer un commentaire