What is the different ways to implement Priority queue?
I read that :
Priority Queue can be viewed as:
View 1: Priority queue as an ordered list.
View 2: Priority queue as a set.
what is the different between them?
It is just the interface and the behavior that makes a priority queue. You can implement it in any way you like. As long as the interface and behavior are the same, the kind of implementation does not matter to the client in the first place.
The differences of various approaches are mainly implications to performance or memory-usage. For example, when using a sorted array as the underlying data structure, it might be necessary to reorganize the whole array when adding/removing items to/from the queue, while the same operation is relatively cheap when using a linked list.
The properties of the data structures and algorithms will propagate to the clients. You will have to choose an implementation that fits your use case by analyzing the most frequent operations etc.
I don't think that set-based implementations are a good fit for this as sets only allow unique items. Just like with priority queues, there are different Set implementations that have different properties, but typically, a set is unordered and you might have to look at each item to figure out which one is the next in queue. But again: if uniqueness of items fits your use case you can use it. But I would rather name such an implementation PrioritySet or UniquePriorityQueue to communicate the properties to the client.