Problems to be solved in data structure

CSDN Q & A 2022-02-13 08:30:56 阅读数:281

problems solved data structure

Topic 1 : Suppose that the job entering the computer system (job) Given an assignment number (job number) And one from 0~9 Priority in (priority),0 Indicates the maximum priority ,9 Indicates the minimum priority . The job number of the job waiting to be executed by the job is saved in a priority queue (priority queue) in . Write a program , Use priority queues to store jobs , And allow the user to select the menu operation :R( Delete remove)、A( increase add) and L( list list). about R, Read the job number with the highest priority and delete it from the priority queue , If there are multiple jobs with the highest priority , Then delete the job with small job number from the priority queue ; about A, Read in the job number and priority , Then add it to the priority queue according to the above rules ; about L, Then all job numbers and their priorities in the queue are listed . The job number can be expressed as an integer , It can be given by the system when the job enters the system .
Design appropriate data element types , Use the unordered order table to realize the priority queue and write the verification code to verify each operation , Complete the demonstration scheme of job scheduling of the above computer system . Insert the new job at the end of the table . It is assumed that the job number can reflect the order in which jobs are added , Therefore, together with the job priority, a job can be uniquely identified .
Complete the problem with binary sort tree 1.




Take the answer :

Hello , I am a little assistant who answers every question , So sorry , This time, you have to answer all your questions , At present, it is beyond the scope of our service , I can't answer for you .

The first questioner can experience the service of answering questions for free . At present, the service scope of the first question is : programing language 、Java Development 、python、 database 、 The front-end development Professional and technical problems in the field , Provide you with ideas and guidance for solving problems . No source code is provided 、 Write project documents 、 The paper is written on behalf of 、 Do your homework 、 Send or install installation package resources 、 Software guidance and other services .

We will continue to optimize , Expand our service range , Bring you better service .


copyright:author[CSDN Q & A],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130830548129.html