Creates a deque with the given initialCapacity. The deque grows automatically as needed when elements are added beyond the current capacity.