```ruby
# Chapter 4 Trees and Graphs

# 4.1 Route Between Nodes: Given a directed graph, design an algorithm to find out whether there is a route between two nodes.
```

Add Tree, Graph and Node classes
user
```ruby
# Chapter 4 Trees and Graphs

class Tree
  attr_accessor :root
  def initialize(root = Node.new)
    @root = root
  end
end

class Graph
  attr_accessor :nodes
  def initialize(nodes)
    @nodes = nodes
  end
end

class Node
  attr_accessor :value, :children
  def initialize(value, children)
    @value = value
    @children = children
  end
  def to_s
    value.to_s
  end
end

# 4.1 Route Between Nodes: Given a directed graph, design an algorithm to find out whether there is a route between two nodes.
```
assistant