7 kyu

Sum of two lowest positive integers

102,394 of 239,057emporio

Description:

Create a function that returns the sum of the two lowest positive numbers given an array of minimum 4 positive integers. No floats or non-positive integers will be passed.

For example, when an array is passed like [19, 5, 42, 2, 77], the output should be 7.

[10, 343445353, 3453445, 3453545353453] should return 3453455.

Arrays
Fundamentals

Stats:

CreatedJun 28, 2015
PublishedJun 28, 2015
Warriors Trained345310
Total Skips26506
Total Code Submissions606251
Total Times Completed239057
JavaScript Completions94901
Ruby Completions7691
Python Completions102394
C# Completions15299
C++ Completions10641
F# Completions280
Elixir Completions652
Swift Completions2958
Julia Completions159
Scala Completions722
C Completions2418
R Completions214
Crystal Completions17
Lua Completions208
Rust Completions408
Java Completions2530
TypeScript Completions856
CoffeeScript Completions9
Haskell Completions107
Total Stars1672
% of votes with a positive feedback rating89% of 17213
Total "Very Satisfied" Votes13747
Total "Somewhat Satisfied" Votes3075
Total "Not Satisfied" Votes391
Ad
Contributors
  • emporio Avatar
  • Unnamed Avatar
  • GiacomoSorbi Avatar
  • natan Avatar
  • Elliandir Avatar
  • suic Avatar
  • nakulgupta18 Avatar
  • anter69 Avatar
  • LikeMyGeek Avatar
  • donaldsebleung Avatar
  • Chrono79 Avatar
  • Dentzil Avatar
  • user5036852 Avatar
  • davejones Avatar
  • acjoker Avatar
  • Voile Avatar
  • Madjosz Avatar
  • kingcobra Avatar
  • rowcased Avatar
  • EmeraldSlash Avatar
  • hobovsky Avatar
  • xavierguihot Avatar
  • stellartux Avatar
  • username0 Avatar
  • ejini战神 Avatar
  • PurpleDre Avatar
  • tobeannouncd Avatar
  • uebernihilist Avatar
  • XoRMiAS Avatar
  • bkrumholz Avatar
  • fcr-- Avatar
  • KayleighWasTaken Avatar
  • francisco.ls Avatar
  • JavaScripts Avatar
Ad