5 kyu

Compare Number

Description:

I saw @myjinxin2015's Simple Fun #264: Compare Two Integers and thought, "hey what if the two numbers ain't integers, ain't always positive and could have leading zeros?"

Compare two numbers given as strings. Return 'less' if a < b, 'equal' if a = b, and 'greater' if a > b.

NOTE

  1. The numbers a and b are given as string
  2. They can be positive or negative
  3. They can have leading zeros in the characteristic part and trailing zero in the mantissa part

12.34 => characteristic part = 12; mantissa part = 34

Fundamentals

Stats:

CreatedMay 16, 2017
PublishedMay 16, 2017
Warriors Trained410
Total Skips8
Total Code Submissions1151
Total Times Completed122
JavaScript Completions122
Total Stars9
% of votes with a positive feedback rating88% of 38
Total "Very Satisfied" Votes30
Total "Somewhat Satisfied" Votes7
Total "Not Satisfied" Votes1
Total Rank Assessments7
Average Assessed Rank
5 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • osofem Avatar
  • smile67 Avatar
Ad