Var: replace LinkedList usage with ArrayDeque

Since the stack uses only Deque operations anyway.