New answers tagged

1

Making an str(which makes a string from an object) for the node class which would simplify the graph return method the str converts an object to a string type is this a dense graph or sparse graph? Sparse Graphs have a lot less edges between vertices Sparse Graphs can be efficently used as adjency lists Dense Graphs can be efficnetly represented with an ...


3

Indentation You should use four spaces instead of two. Spacing Your class methods should be separated by an empty line, so everything doesn't look so crowded. Getters Since all class variables are public (except _var and __var variables), you don't need to define getters to access these properties. Simple do Iterator.name, etc. Iterator.__str__ You should ...


Top 50 recent answers are included