Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

165. Compare Version Numbers #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
zwfang merged 1 commit into master from Compare-Version-Numbers
Jan 7, 2019
Merged

165. Compare Version Numbers #50

zwfang merged 1 commit into master from Compare-Version-Numbers
Jan 7, 2019

Conversation

Copy link
Collaborator

@zwfang zwfang commented Jan 7, 2019

https://leetcode.com/problems/compare-version-numbers/

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.

You may assume the default revision number for each level of a version number to be 0.
For example, version number 3.4 has a revision number of 3 and 4 for its first and second level revision number.
Its third and fourth level revision number are both 0.

Note:

Version strings are composed of numeric strings separated by dots . and this numeric strings may have leading zeroes.
Version strings do not start or end with dots, and they will not be two consecutive dots.

@zwfang zwfang added string A string is used to represent text. It is comprised of a set of characters. Medium Coefficient of difficulty medium labels Jan 7, 2019
Copy link

codecov bot commented Jan 7, 2019
edited
Loading

Codecov Report

Merging #50 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@ Coverage Diff @@
## master #50 +/- ##
=========================================
+ Coverage 99.39% 99.4% +0.01% 
=========================================
 Files 91 92 +1 
 Lines 1627 1643 +16 
=========================================
+ Hits 1617 1633 +16 
 Misses 6 6 
 Partials 4 4
Impacted Files Coverage Δ
...compare_version_numbers/compare_version_numbers.go 100% <100%> (ø)

@zwfang zwfang merged commit dd53604 into master Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Medium Coefficient of difficulty medium string A string is used to represent text. It is comprised of a set of characters.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /