Repairing a stalled processing loop

An algorithm processes a finite, nonempty queue of expense claims. Its position starts at the first claim, and the queue does not change during processing. The instructions repeat while the position refers to a claim:

  1. If required information is missing, record REVIEW and immediately restart the loop at the current position.
  2. Otherwise, record the policy outcome and advance the position to the next claim.

The requirement is to process every claim exactly once and then stop. Which revision meets that requirement, including when some claims have missing information?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Data Algorithms Questions: