January 2020
Intermediate to advanced
470 pages
11h 13m
English
Working with persistent data structures requires some cloning, but how would you implement a persistent array? If you think about this, you'll realize that, in that case, there would be no way out apart from cloning the whole array after each operation. This would mean that an operation such as updating an element in an array, which took a constant time, would now take a length of time proportional to the size of the array.
How do we avoid this? There's no easy solution. ...