lib/yargraph.rb
# Remove and return an arbitrary
# edge from the Set, or nil if there are no
# edges remaining.
# Returned is a 2 element Array of vertex1, vertex2
Remove and return an arbitrary
edge from the Set, or nil if there are no
edges remaining.
Returned is a 2 element Array of vertex1, vertex2
Remove and return an arbitrary edge from the Set or nil if there are no edges remaining . Returned is a 2 element Array of vertex1 vertex2
def pop
        each do |v1, v2|
          delete v1, v2
          return [v1, v2]
        end
        return nil
      end
def pop each do | v1 , v2 | delete v1 , v2 return [ v1 , v2 ] end return nil end
Remove and return an arbitrary
edge from the Set, or nil if there are no
edges remaining.
Remove and return an arbitrary edge from the Set or nil if there are no edges remaining .