7 kyu
Highest and Lowest
18,555 of 308,899Deantwo
Description:
In this little assignment you are given a string of space separated numbers, and have to return the highest and lowest number.
Examples
Kata.HighAndLow("1 2 3 4 5"); // return "5 1"
Kata.HighAndLow("1 2 -3 4 5"); // return "5 -3"
Kata.HighAndLow("1 9 3 4 -5"); // return "9 -5"
Notes
- All numbers are valid
Int32
, no need to validate them. - There will always be at least one number in the input string.
- Output string must be two numbers separated by a single space, and highest number is first.
Fundamentals
Strings
Similar Kata:
Stats:
Created | May 7, 2015 |
Published | May 7, 2015 |
Warriors Trained | 504148 |
Total Skips | 36878 |
Total Code Submissions | 984046 |
Total Times Completed | 308899 |
C# Completions | 18555 |
JavaScript Completions | 124218 |
Python Completions | 102113 |
Ruby Completions | 9298 |
Java Completions | 29610 |
CoffeeScript Completions | 60 |
Haskell Completions | 1948 |
Rust Completions | 3102 |
TypeScript Completions | 5310 |
F# Completions | 235 |
Go Completions | 4324 |
Kotlin Completions | 2924 |
PHP Completions | 6401 |
Crystal Completions | 49 |
C++ Completions | 6306 |
Elixir Completions | 320 |
Julia Completions | 110 |
R Completions | 255 |
Clojure Completions | 218 |
C Completions | 1189 |
COBOL Completions | 11 |
Scala Completions | 272 |
D Completions | 14 |
Lua Completions | 189 |
Factor Completions | 16 |
Groovy Completions | 15 |
Dart Completions | 107 |
Swift Completions | 87 |
Total Stars | 3491 |
% of votes with a positive feedback rating | 90% of 23704 |
Total "Very Satisfied" Votes | 19480 |
Total "Somewhat Satisfied" Votes | 3858 |
Total "Not Satisfied" Votes | 366 |