Round 1
Questions: You are given a list of jobs, the time they are submitted at, and the amount of time it takes to do them. The program should print the start, and end time of each job, as if the OS had scheduled them using FCFS.
Sample Input:
P1 submission_time=0 execution_time=5 P2 submission_time=5 execution_time=10
Follow-up Question
We now also have priority of each process. One with the highest priority should be executed first. But the CPU should pick lower priority process if it's idle. Process which is picked up will be executed completely.
Candidate's Approach
Solved the initial one with a basic priorityQueue. Messed up on the follow-up question. Came up with a complicated non-optimal solution and coded it with maybe a couple of bugs.
Interviewer's Feedback
No feedback provided.