Is there an unsynchronized version java.util.Stack?
ArrayList has almost everything I want, except that there seems to be no method that removes the last element in an arithmetic constant time.
I want something that can act like a stack, but still let me have constant random access to the elements.
If there is really nothing, itβs just not easy for me to deploy my own or just use it java.util.Stack, but it seemed strange to me that I couldnβt find a Stacksynchronized analogue, that I thought it might be worth asking (also Google seemed to just point me to other implementations, not to a class in the standard library).
source
share