adjToEdge function

Helper function to convert adjacency matrix to edges