Dynamic connectivity with Ruby

Maze

The dynamic connectivity problem uses a graph (a data structure) that maintains information about the relationship between its components. With this information the data structure can answer whether there is a connection between two objects or not.