7 kyu
Sorted? yes? no? how?
1,443 of 21,990janitormeir
Description:
Complete the method which accepts an array of integers, and returns one of the following:
"yes, ascending"
- if the numbers in the array are sorted in an ascending order"yes, descending"
- if the numbers in the array are sorted in a descending order"no"
- otherwise
The order does not have to be strict: a sorted array can contain consecutive duplicates, e.g. [1, 1, 2, 3]
is sorted in ascending order.
It is guaranteed that there will always be a unique valid answer. More precisely:
- there will be no arrays with less than 2 elements
- there will be no arrays where all elements are equal
Arrays
Sorting
Fundamentals
Similar Kata:
Stats:
Created | Oct 21, 2016 |
Published | Oct 21, 2016 |
Warriors Trained | 39181 |
Total Skips | 5143 |
Total Code Submissions | 92534 |
Total Times Completed | 21990 |
JavaScript Completions | 6378 |
Java Completions | 2472 |
C# Completions | 864 |
Python Completions | 6737 |
Ruby Completions | 848 |
C Completions | 1443 |
C++ Completions | 2408 |
TypeScript Completions | 659 |
Haskell Completions | 376 |
Clojure Completions | 316 |
Total Stars | 376 |
% of votes with a positive feedback rating | 88% of 2659 |
Total "Very Satisfied" Votes | 2116 |
Total "Somewhat Satisfied" Votes | 469 |
Total "Not Satisfied" Votes | 74 |
Total Rank Assessments | 8 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |