Re-implement using java.util.List instead of Bag and MinPQ