Retired
Second Biggest and Second Lowest Sum (retired)
Description:
Write a function that returns sum of second biggest and second lowest number of Array.
Array may includes Not a Numbers
, or String numbers(!)
, you should ignore them.
If the sum is NaN
return 0
.
if in Array just one value
and it is a Number you should return this number
if its Not a Number
return 0
arr = [1,5,87,45,8,8]sum is45 + 5 = 50
arr = ['str',3,5,7,2,'6']sum is3 + 5 = 8
because '6' is a string! And 'str' is also a string so they are both doesn't countarr = [42]return 42arr = ['4'] or ['4','a']return 0
Fundamentals
Similar Kata:
Stats:
Created | Jun 10, 2022 |
Warriors Trained | 20 |
Total Skips | 0 |
Total Code Submissions | 78 |
Total Times Completed | 17 |
JavaScript Completions | 17 |
Total Stars | 0 |
% of votes with a positive feedback rating | 38% of 12 |
Total "Very Satisfied" Votes | 3 |
Total "Somewhat Satisfied" Votes | 3 |
Total "Not Satisfied" Votes | 6 |
Total Rank Assessments | 12 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |