Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Trie search algorithm
Justin To
6/13/2008 5:43:00 PM
I'm lost--can't figure out the algorithm to output a trie.
class Trie
@value
@children = [] # array of tries
@number_exists # bool
end
0 # Root = nil
/
1 => number_exists = true(#1)
/
1 => number_exists = true(#11)
/ => 1 => true(#111)
/ => 2 => true(#1112)
/ => 2 => true(#112)
/ => 5 => true(#1125)
0 => number_exists = true(#110)
Any help is much appreciated, thanks!
Justin
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Trie search algorithm
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password