关闭

Easy-题目66:165. Compare Version Numbers

76人阅读 评论(0) 收藏 举报
分类:

题目原文:
Compare two version numbers version1 and version2.
If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0.

You may assume that the version strings are non-empty and contain only digits and the . character.
The . character does not represent a decimal point and is used to separate number sequences.
For instance, 2.5 is not “two and a half” or “half way to version three”, it is the fifth second-level revision of the second first-level revision.
题目大意:
比较两个软件的版本号version1和version2.如果version1>version2则返回1,version1

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:64443次
    • 积分:3285
    • 等级:
    • 排名:第10717名
    • 原创:270篇
    • 转载:53篇
    • 译文:0篇
    • 评论:8条
    文章分类
    最新评论