Implementation of 4 types of priority queues