这道题的难度是Easy,但是通过率不高,主要是题目给的不是很明确,测试的场景也比较复杂。
经过多番调试,终于Accepted。目前的解决方式采用了递归。采用非递归的方式,需要记录连续两个'.'的位置,觉得操作太烦了,故没有使用。
int compareVersion(string version1, string version2)
这道题的难度是Easy,但是通过率不高,主要是题目给的不是很明确,测试的场景也比较复杂。
经过多番调试,终于Accepted。目前的解决方式采用了递归。采用非递归的方式,需要记录连续两个'.'的位置,觉得操作太烦了,故没有使用。
int compareVersion(string version1, string version2)