Chapter 3: Problem 11
In a scheduling program, we want to check whether two appointments overlap. For simplicity, appointments start at a full hour, and we use military time (with hours 0-24). The following pseudocode describes an algorithm that determines whether the appointment with start time startl and end time end 1 overlaps with the appointment with start time start2 and end time end2. H start1 s start2 \(s=\) start 1 the \(s=\) start2 If end \(1<\) end2 \(e\) * end 1 The \(e=\cos 2\) If see The appointionents overlap. Flue The appointwents don't overlap. 'Trace this algorithm with an appointment from 10-12 and one from 11-13, then with an appointment from 10-11 and one from 12-13.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.