FA-95733 / Shipping rate zone lookup / Member archive
Area surcharge: binary search over unsorted ranges · case 03
ZIPs in ranges listed out of order are not surcharged.
Case contract
zip5 is a five-digit ZIP or ZIP+4. ranges [[lo, hi, code]] are non-overlapping inclusive five-digit ranges in any order. Look up the range containing the ZIP (sorted ranges, binary search) and return [code, fee] with DAS 395, EXT 510, REMOTE 1500 cents; uncovered ZIPs -> ["NONE", 0].
Why this case matters
Delivery area surcharges are keyed by destination ZIP ranges.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| generated mix 66 | ["NONE", 0] | ["DAS", 395] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗