I would use the language I know the best which provide a library that handles .dot files (Graphviz?) and I would check if the library has an internal data structure for the graphs.
I guess it would be adjacency matrice or adjacency lists.
I would use the language I know the best which provide a library that handles .dot files (Graphviz?) and I would check if the library has an internal data structure for the graphs.
I guess it would be adjacency matrice or adjacency lists.
Thank you for the article. Opaque struct is an interesting subject for people who want to go deeper into their understanding of C.
If I could add/emphasis two points to the article:
FILE is a famous example of struct using this trick. So, even if yon don’t often need to develop an opaque struct in C, you certainly use such struct daily without knowing.
you can’t declare a variable with an opaque type (because the compiler would need to know its size). Everything must be handled through pointers, and the library has to provide functions to allocate/destroy the struct, like fopen() and fclose() for FILE.
Yeah, you’re right, it doesn’t make sense to say that O(f(n)) is good or bad for any algorithm. It must be compared to the complexity of other algorithms which solve the same problem in the same conditions.