Alternatively, here's my list ADT implementation which has O(log n) access/insertion/deletion time: https://www.nayuki.io/page/avl-tree-list .