Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please provide some comments as well Problem: Graduate Source file: graduate C,

ID: 3538976 • Letter: P

Question

Please provide some comments as well


Problem: Graduate Source file: graduate C, cpp, java Input file: graduate in A prospective CS student is investigating how many semesters it will take to graduate from a variety of different universities. Each university provides a list of required courses, their prerequisites, and when each course is offered Given this information, determine the minimum number of semesters to graduate Consider the following example. A student is required to take 4 courses, int42, cs123, cs456, and cs789. mt42 is only offered in the fall semester and has no prerequisites. Similarly, cs123 is only offered in the spring semester and has no prerequisites. cs456 is only offered in the spring semester and has both cs123 and m142 as prerequisites. Finally, cs789 is offered in both fall and spring and has cs456 as its only prerequisite. The shortest time to graduate is 5 semesters, by taking m142 in the fall, cs123 in the next spring cs456 the following spring (since it is not offered in the fall) and finally cs 789 the following fall For this problem, there are only two semesters, fall and spring. Always start counting semesters from the fall In addition to the fall spring scheduling issues, there is one slight complication. In order to keep the dormitories full each university limits the number of courses that can be taken in any semester. This limit appears as part of the input data. The third example below illustrates this issue Input: There are one to twenty-five data sets, followed by a final line containing only the integers -l -1. A data set starts with a line containing two positive integers n, l s n s 12, which is the number of courses in this data set and m in 6, which is the maximum number of courses that can be taken in any single semester. The next line contains the n course Following the course identifiers is the individual course identifiers. Each is a 1-5 character string from the set ta-z, 0-9). information. This consists of n lines, one line for each course, containing the course identifier, semester offered E' Fall, 'S' Spring 'B' Both semesters), the number of prerequisite courses, p, 0 sp s 5, and finally p prerequisite course identifiers. The first example data set below corresponds to the problem described above Output: The output contains one line for each data set, formatted as shown in the sample output Example input: Example output: 4 6 The minimum number f semesters require to graduate is 5 cs123 mt 42 ca 456 ca 789 The minimum number f semesters require to graduate is 4 mt 42 E 0 The minimum number f semesters require to graduate is 2 cs 123 S 0 cs 456 S 2 cs 123 mt 4 cs 789 1 3 4 5 6 comp 2 comp 3 mat S 1 comp mp3 math1 S comp 2 F 1 mathl m 10 rm 20 c33 c44 m 10 20 c 33 c 44 B

Explanation / Answer

need more time

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote