38/40
Part 7 of 7 · Follow-upsLearn

The tests you'd write: brute force on small inputs first, then the edges

Brute force on small random inputs comes first. The run with one deletion, the trip in time and the team were each checked against it above. The practice problem's worked solution matched trying every route on 3,000 random small parks.

Then the edges:

  • an empty input, and one element
  • a tie
  • something unreachable
  • scores below zero
  • a limit of 0
  • a chain longer than 1,000, listed in both directions, for the recursion limit