Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Oct 12th, 2018 46 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. struct Comparator
  2. {
  3.   bool operator()(const process &lhs, const process &rhs) const
  4.   {
  5.     if(lhs.get_Priority() == rhs.get_Priority())
  6.         return (lhs.get_arrivalTime() > rhs.get_arrivalTime());
  7.     else
  8.         return (lhs.get_Priority() > rhs.get_Priority());
  9.   }
  10. };
  11.    
  12. priority_queue<process, deque<process>, Comparator> ReadyQueue;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top