Exotic Data Structures (2011)
concatenative.org
concatenative.org
* Random access - constant O(1)
* Insertion or removal of elements at the end or beginning - constant O(1)
* Insertion or removal of elements - linear O(n)
Also in glibc/libstdc++ it is one
https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a015...[1] http://en.cppreference.com/w/cpp/container/deque
[2] https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a015...
[3] https://github.com/llvm-mirror/libcxx/blob/master/include/de...
Are you intentionally twisting this backwards or something? You're basically turning the conversation into something like this:
You: "Penguins are birds, right? What's so exotic about penguins when I see all these birds flying around me?"
Me: "Penguins live in Antarctica... and don't fly... (hence why people find them exotic...)"
You: "But who says birds can't live in Antarctica?? And chickens can't fly either. And penguins are birds. So what's so exotic about penguins?"
Me: {what sane response can I even give you here?!}
________________________________________
But anyway...
> implies that compact dynamic array can't be used for std::deque, when it is used as such
To entertain your new argument here:
Deque requires references to existing elements not to be invalidated when new elements are appended. I don't know how compact dynamic arrays work, but dynamic arrays generally move elements around in memory while maintaining guaranteed worst-case O(1)-time access to them, so it seems kind of impossible for them to meet both requirements.
Nowhere! Where did I even claim it said that anywhere?!
Their data structure is considerably more complex than traditional implementations of std::deque, I wonder if it is actually of any practical interest.
The small fixed size of the sub-arrays in std::deque is basically a defect making the container a lot less useful.