正在加载图片...
General Idea Example:Suppose there are a sequence of jobs are sent to a printer.Although jobs sent to a printer are generally placed on a queue,this might not always be the best thing to do. For instance,if,when the printer becomes available, there are several 1-page jobs and one 100-page job, it might be reasonable to make the long job go last, even if it is not the last job submitted. This particular application seems to require a special kind of queue,known as a priority queue.General Idea ◼ Example: Suppose there are a sequence of jobs are sent to a printer. Although jobs sent to a printer are generally placed on a queue, this might not always be the best thing to do. ◼ For instance, if, when the printer becomes available, there are several 1-page jobs and one 100-page job, it might be reasonable to make the long job go last, even if it is not the last job submitted. ◼ This particular application seems to require a special kind of queue, known as a priority queue
向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有