J
Justin To
class Trie
attr_reader :value, arent, :child_node
def initialize(value=nil, parent=nil)
@value = value
@children = {}
@parent = parent
@child_node = @children # ??? HERE
end
end
# ??? HERE: Does it matter if I do @child_node = children (without the @
for children)? What's the difference with using the @ and not?
Thank you!!
attr_reader :value, arent, :child_node
def initialize(value=nil, parent=nil)
@value = value
@children = {}
@parent = parent
@child_node = @children # ??? HERE
end
end
# ??? HERE: Does it matter if I do @child_node = children (without the @
for children)? What's the difference with using the @ and not?
Thank you!!