6 kyu
Odder than the rest
139 of 315JohanWiltink
Description:
Integral numbers can be even or odd.
Even numbers satisfy n = 2m
( with m
also integral ) and we will ( completely arbitrarily ) think of odd numbers as n = 2m + 1
.
Now, some odd numbers can be more odd than others: when for some n
, m
is more odd than for another's. Recursively. :]
Even numbers are just not odd.
Task
Given a finite list of integral ( not necessarily non-negative ) numbers, determine the number that is odder than the rest.
If there is no single such number, no number is odder than the rest; return Nothing
, null
or a similar empty value.
Examples
oddest([1,2]) => 1
oddest([1,3]) => 3
oddest([1,5]) => None
Hint
Click here.
How odd is-1
?
Puzzles
Algorithms
Recursion
Similar Kata:
Stats:
Created | Sep 3, 2019 |
Published | Sep 3, 2019 |
Warriors Trained | 2176 |
Total Skips | 163 |
Total Code Submissions | 6586 |
Total Times Completed | 315 |
Haskell Completions | 19 |
JavaScript Completions | 92 |
Python Completions | 139 |
Crystal Completions | 3 |
CoffeeScript Completions | 7 |
Ruby Completions | 21 |
TypeScript Completions | 19 |
Dart Completions | 33 |
Julia Completions | 8 |
C# Completions | 29 |
Factor Completions | 10 |
λ Calculus Completions | 1 |
Total Stars | 27 |
% of votes with a positive feedback rating | 77% of 88 |
Total "Very Satisfied" Votes | 60 |
Total "Somewhat Satisfied" Votes | 16 |
Total "Not Satisfied" Votes | 12 |
Total Rank Assessments | 10 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |