7 kyu
Tidy Number (Special Numbers Series #9)
1,098 of 11,746MrZizoScream
Description:
Definition
A Tidy Number is a number whose digits are in non-decreasing order.
Task
Given a number, determine if it is tidy or not.
Notes
- The number passed will always be positive.
- Return the result as a boolean.
Examples
12 ==> return true
Explanation: Digits {1, 2} are in non-decreasing order (1 <= 2).
32 ==> return false
Explanation: Digits {3, 2} are not in non-decreasing order (3 > 2).
1024 ==> return false
Explanation: Digits {1, 0, 2, 4} are not in non-decreasing order (1 > 0).
13579 ==> return true
Explanation: Digits {1, 3, 5, 7, 9} are in non-decreasing order.
2335 ==> return true
Explanation: Digits {2, 3, 3, 5} are in non-decreasing order (3 = 3).
Playing with Numbers Series
Playing With Lists/Arrays Series
For More Enjoyable Katas
ALL translations are welcomed
Enjoy Learning!!
Zizou
Fundamentals
Arrays
Strings
Similar Kata:
Stats:
Created | Feb 16, 2018 |
Published | Feb 16, 2018 |
Warriors Trained | 16179 |
Total Skips | 945 |
Total Code Submissions | 36004 |
Total Times Completed | 11746 |
C++ Completions | 1098 |
Python Completions | 3397 |
Crystal Completions | 14 |
Ruby Completions | 276 |
JavaScript Completions | 3708 |
Java Completions | 1438 |
C Completions | 319 |
Haskell Completions | 122 |
C# Completions | 504 |
NASM Completions | 20 |
Dart Completions | 419 |
Julia Completions | 32 |
PHP Completions | 302 |
TypeScript Completions | 247 |
CoffeeScript Completions | 11 |
Reason Completions | 7 |
Elixir Completions | 75 |
Prolog Completions | 28 |
Clojure Completions | 39 |
Rust Completions | 210 |
R Completions | 41 |
D Completions | 11 |
Factor Completions | 13 |
Total Stars | 125 |
% of votes with a positive feedback rating | 93% of 1634 |
Total "Very Satisfied" Votes | 1439 |
Total "Somewhat Satisfied" Votes | 170 |
Total "Not Satisfied" Votes | 25 |
Total Rank Assessments | 8 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |