Computer Science I / Integrated Data-Structure Reasoning
Practice question · Select all that apply

Select every edge case the lesson says the task manager should be tested against.

Hints
  1. Three of these are situations where the program must make a decision that the code has to define.
  2. Ask which options describe a genuine ambiguity in the design rather than a limit of the hardware.
Show the answer
  • A. Cancelling a task that is currently running
  • B. Two tasks sharing the same deadline
  • C. An empty manager with no tasks at all
Why

Emptiness, duplicate deadlines and cancelling something already running are all points where the behaviour is genuinely undefined until you decide it. A large id is just another key to hash, and running out of memory is a hardware limit rather than a behaviour the design can specify.

Read the lesson: Integrated Data-Structure Reasoning →

Practise Integrated Data-Structure Reasoning

The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Integrated Data-Structure Reasoning