A Logarithmic Implementation of Flexible Arrays

In this paper we derive an implementation of so-called flexible arrays; a flexible array is an array whose size can be changed by adding or removing elements at either end. By representing flexible arrays by so-called Braun trees, we are able to implement all array operations with logarithmic — in the size of the array—time complexity.