Verification challenge from VerifyThis: finding the least-common prefix of an array starting from two given indices.