From: Justin To Date: 2008-06-13T07:44:40+09:00 Subject: Re: Trie data structure def each info = [value,number_exists, children] yield(info) @children.each do |child_node| child_node.each { |e| yield e } end end def output numberCollector = [] tempString= '' each do |x| tempString.concat(x[0].to_s) if(x[1]) numberCollector.push(tempString) tempString=tempString.chop end end puts numberCollector end Only works for numbers that share (1) common node: e.g. 22, 23, 24, 25 What can I do to output numbers that share (x) common nodes? Thanks! -- Posted via http://www.ruby-forum.com/.