Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

two lowest positive numbers given an array of minimum

using System.Linq;

public static class Kata
{
  public static int sumTwoSmallestNumbers(int[] numbers)
  {
    return numbers.OrderBy(i => i).Take(2).Sum();
  }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: store file in DB 
Csharp :: Debug output to console and a log 
Csharp :: collection to datatable c# 
Csharp :: list.SkipWhile in c# 
Csharp :: vb.net check operating system 
Csharp :: tmpro pageCount update 
Csharp :: scroll two divs simultaneously site:stackoverflow.com 
Csharp :: check null type 
Csharp :: difference between %e/E, %f/F and %g/G in program C 
Csharp :: Connect secretclient to proxy 
Csharp :: Convert C# Class to xml wth xsd.exe 
Csharp :: get innermost exception c# 
Csharp :: jtoken value is not exact 
Csharp :: CefSharp.Core in clickones application 
Csharp :: How to truncate a decimal without rounding 
Csharp :: c# blazor update state 
Csharp :: asp net identity add a unique fields to user 
Csharp :: c# how to output array 
Csharp :: asp.net mvc class="" inline select 
Csharp :: c# words return first 20 items of array 
Csharp :: notification platform not available c# 
Csharp :: IOS app crashing on ios 15 unity 
Csharp :: c# Color Convert 
Csharp :: what is vector3.one c# 
Csharp :: C# list of unique values with group and counts 
Csharp :: detect mouse in bottom of screen + unity 
Csharp :: Rotate Object with keyboard 
Csharp :: godot c# signal 
Csharp :: c# open config file by path 
Csharp :: blazor OnInitializedAsync Unhandled exception rendering component: Cannot wait on monitors on this runtime. 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =