First page Back Continue Last page Graphics
Functional Arrays using Shallow Binding
Notes:
We can solve both of these problems by splitting the array with a 1/N probability at every rotate. Now by the time we've spent O(N) time reading the array, we have our own copy. If we spend less than that amount of time reading, then we won't have to pay for the split.