No need of deque