[Python] Representing graphs (data structure) in Python

Discussão em 'Python' iniciado por Stack, Fevereiro 9, 2025.

  1. Stack

    Stack Membro Participativo

    How can one neatly represent a graph in Python? (Starting from scratch i.e. no libraries!)
    What data structure (e.g. dicts/tuples/dict(tuples)) will be fast but also memory efficient?
    One must be able to do various graph operations on it.

    As pointed out, the various graph representations might help. How does one go about implementing them in Python?

    As for the libraries, this question has quite good answers.

    Continue reading...

Compartilhe esta Página