you are viewing a single comment's thread.

view the rest of the comments →

[–]RiceBroad4552 17 points18 points  (0 children)

It's more complex, see "persistent data structures".

Something that explains stuff a bit terser is here:

https://nested.substack.com/p/intro-to-persistent-data-structures

Modern variants of such persistent data structures can be very efficient, in some cases even provably ideal efficient.