solved AnimalShelter, minmaxStack (alternate algo), added priority q