MAXIMUM AND MINIMUM PRIORITY QUEUE