← BYTES
Algorithms·Starter·Ref: 12.1.18

What is an 'edge case' when testing an algorithm?

Have a question about this video? Mention reference 12.1.18 when you contact us.

a.Any input that produces the correct output
b.A test that always fails regardless of the algorithm's correctness
c.A case where the algorithm runs on the edge of a graph
d.An unusual or boundary input -- like an empty array, a single-element array, or all-duplicate values -- that often exposes bugs a typical input wouldn't
Edge cases sit at the boundaries of an algorithm's expected input space -- an empty collection, a single element, duplicate values, already-sorted or reverse-sorted input -- and are disproportionately likely to reveal off-by-one errors or unhandled special cases that typical 'normal-looking' test inputs miss entirely.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES12118#Algorithms