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

Stats:

CreatedFeb 16, 2018
PublishedFeb 16, 2018
Warriors Trained16179
Total Skips945
Total Code Submissions36004
Total Times Completed11746
C++ Completions1098
Python Completions3397
Crystal Completions14
Ruby Completions276
JavaScript Completions3708
Java Completions1438
C Completions319
Haskell Completions122
C# Completions504
NASM Completions20
Dart Completions419
Julia Completions32
PHP Completions302
TypeScript Completions247
CoffeeScript Completions11
Reason Completions7
Elixir Completions75
Prolog Completions28
Clojure Completions39
Rust Completions210
R Completions41
D Completions11
Factor Completions13
Total Stars125
% of votes with a positive feedback rating93% of 1634
Total "Very Satisfied" Votes1439
Total "Somewhat Satisfied" Votes170
Total "Not Satisfied" Votes25
Total Rank Assessments8
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • MrZizoScream Avatar
  • GiacomoSorbi Avatar
  • donaldsebleung Avatar
  • imjasonmiller Avatar
  • kazk Avatar
  • riyakayal Avatar
  • B1ts Avatar
  • Blind4Basics Avatar
  • Voile Avatar
  • realfg Avatar
  • rsa Avatar
  • clcraig Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • cliffstamp Avatar
  • uniapi Avatar
  • stellartux Avatar
  • trashy_incel Avatar
  • user8436785 Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • Just4FunCoder Avatar
  • razetime Avatar
Ad