3 ms·
You can create a persistent ordered container that has both prepend and append in amortised constant time; and concatenate in log time.
by willtim 10y ago
You can create a persistent ordered container that has both prepend and append in amortised constant time; and concatenate in log time.
- geocar 10y agoCaching isn't great though. Pagetables are a trie, so it's max log log log time to prepend, append, or concatenate, and usually constant small for two of them (but admittedly: you usually have to pick if you don't know how many arrays you want).