Why sir has not use priority_queue

As in 5:30 sir has told we will come to reason not use priority queue but not told it in end also;

I want to know as in Priority Queue we pop in O(1) ans insert element in O(longN).

there is no solid reason to not use priority queue
you can use both priority_queue and set here

yes set has a advantage over priority_queue
that in set you can access all element but in priority queue only top element is accessible

yes
std::priority_queue allows to do the following:

  1. Insert an element O(log n)
  2. Get the smallest element O(1)
  3. Erase the smallest element O(log n)

while std::set has more possibilities:

  1. Insert any element O(log n) and the constant is greater than in std::priority_queue
  2. Find any element O(log n)
  3. Find an element, >= than the one your are looking for O(log n) ( lower_bound )
  4. Erase any element O(log n)
  5. Erase any element by its iterator O(1)
  6. Move to previous/next element in sorted order O(1)
  7. Get the smallest element O(1)
  8. Get the largest element O(1)