• tyo_ukko@sopuli.xyz
    link
    fedilink
    arrow-up
    3
    ·
    8 months ago

    Do I understand this correctly, that the first astronaut’s realization is that all data structures are graphs?

    If yes, that doesn’t make much sense. How is an array a graph?

    • ReginaPhalange@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      7 months ago

      One could make the case that we can transform an k size array to a k-vertex-connected graph

      Because traversing from one element to any other element is an O(1) operation using index arithmetics.

      Same for n dimensional matrices.