Compare version strings
Your task
Compare two dot-separated version strings a and b, where each chunk is a non-negative integer (no leading-zero significance: '1.01' equals '1.1'). Return -1 if a < b, 1 if a > b, and 0 if equal. Missing trailing chunks are treated as 0, so '1.0' equals '1'. Each version has up to a few hundred chunks.
Examples
compare_versions(a: str, b: str) -> intExample 1
Input
compare_versions("1.2", "1.10")Output
-1