Computer Science > SOLUTIONS MANUAL > California State University, San Marcos - CS 311pqueue.cpp (All)
// CS311 Yoshii - HW5 Priority Queue Implementation File // Complete all ** parts and give good comments // ================================================= // HW5 Priority Printer Queue // YOUR ... NAME: Joshua Matthews // File Type: implementation pqueue.cpp // ================================================= #include "pqueue.h" // constructor pqueue::pqueue() { count = 0; // no jobs yet } // destructor does nothing pqueue::~pqueue() {} // Purpose: to add a job to a right place in the Pqueue // Argument: j is the job priority number void pqueue::insertjob(int j) { // ** add the job j at the rear (update count) Q[count] = j; count++; trickleup(); // moves the job to the right place } // Purpose: to print a job and reheapify the Pqueue void pqueue::printjob() { cout << "printing: " << Q[0] <<endl; reheapify(); } [Show More]
Last updated: 2 years ago
Preview 1 out of 3 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Apr 09, 2021
Number of pages
3
Written in
All
This document has been written for:
Uploaded
Apr 09, 2021
Downloads
0
Views
100
Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·