[QA] Automatic check of house number order along a street

Is there any tool that verifies automatically that all house numbers along a street are in order?

Say we have a street (not necessarily straight) with house numbers [1, 3, 7, 11, 17, 13, 21] on one side and [2, 8, 10, 20, 4, 22] on the other. Is it possible to find out automatically that 13 and 4 break the sequence on either side?

I can imagine this could be easy to check by projecting the numbers on the street and computing the total street length since one of the street’s endpoints, then sorting the numbers and ensuring the length always increases/decreases but never alternates on this pattern. Question is if anyone has already done something like that.

In my case the numbers do not need to be perfectly sequential between sides (eg.: 8 on the right follows 7 and precedes 9 on the left), but that may be a requirement in other scenarios.