I am wondering if using Deque data structure implemented by ArrayDeque could offer better performance in terms of time complexity compared to the queue implemented by an array or a linked list?
As far as I have understood, both implementations could be O(n) in the worst_case.