Implementation of mergesort algorithm using deque(s)