Could you use a PriorityQueue here rather than 2 separate queues?