Question
Implement Semantic Versioning precedence comparison. Each version is 'MAJOR.MINOR.PATCH' optionally followed by '-' and a prerelease string of dot-separated identifiers. Compare core numbers numerically left to right. A version WITH a prerelease has LOWER precedence than the same core WITHOUT one. Prerelease identifiers compare left to right: numeric identifiers compare numerically and rank below alphanumeric ones; alphanumeric compare lexically; if all shared identifiers are equal, the version with MORE identifiers is greater. Return -1, 0, or 1 for v1 < v2, ==, or >.
semver_compare(v1: str, v2: str) → int["1.0.0","1.0.1"]out-1State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.