Skip to main content
updated with degrees of parallelism; edited body; added 1 characters in body; deleted 1 characters in body
Source Link

C# - 100 characters

C# - 137 characters

Here is an answer in C# (although AsParallel only spawns accordingly to the numberupdated with degrees of cores in ones CPUparallelism as commented).

void ss(int[]xs){xs.AsParallel().WithDegreeOfParallelism(xs.Length).Select(x=>{Thread.Sleep(x);return x;}).ForAll(Console.WriteLine);}

C# - 100 characters

Here is an answer in C# (although AsParallel only spawns accordingly to the number of cores in ones CPU).

void ss(int[]xs){xs.AsParallel().Select(x=>{Thread.Sleep(x);return x;}).ForAll(Console.WriteLine);}

C# - 137 characters

Here is an answer in C# (updated with degrees of parallelism as commented)

void ss(int[]xs){xs.AsParallel().WithDegreeOfParallelism(xs.Length).Select(x=>{Thread.Sleep(x);return x;}).ForAll(Console.WriteLine);}
Source Link

C# - 100 characters

Here is an answer in C# (although AsParallel only spawns accordingly to the number of cores in ones CPU).

void ss(int[]xs){xs.AsParallel().Select(x=>{Thread.Sleep(x);return x;}).ForAll(Console.WriteLine);}