diff --git a/immutable_vec/README.md b/immutable_vec/README.md index f44d86d5..28a66d71 100644 --- a/immutable_vec/README.md +++ b/immutable_vec/README.md @@ -1,10 +1,11 @@ # Immutable Vector -Based on Clojure's [persistent vector](https://hypirion.com/musings/understanding-persistent-vector-pt-1). - -Currently, only `push`, `set` and `get` are implemented, alongside with some iteration functions. - -## TODO - -- Add `insert` and `delete`. -- Support tail optimization. \ No newline at end of file +Based on *RRB Vector: A Practical General Purpose Immutable Sequence, ICFP'15*. + +It supports normal vector operations ($m$ is the branching factor and $n$ is the number of elements): +- Indexing in $O(\log_2{m} \cdot \log_m{n})$ +- Updating in $O(m \cdot \log_m{n})$ +- Removal in $O(m^2 \cdot \log_m{n})$ +- Appending in $O(m \cdot \log_m{n})$ +- Splitting in $O(m \cdot \log_m{n})$ +- Concatenation in $O(m^2 \cdot \log_m{n})$ \ No newline at end of file