Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*"
Saves in:saves
Status closed:yes
Types is:question
Exclude -[tag]
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 29720

Code-golf is a competition to solve a particular problem in the fewest bytes of source code.

1 vote

Random Golf of the Day #2: Numbers from a Normal Distribution

Perl, 150 108 107 bytes This uses the Marsaglia Polar Method. Called with f(S, N). Moved the assignment of $a into the calculation of $c. 107: sub f{srand$_[0];map{do{$c=($a=-1+2*rand)**2+(-1+2*ra …
4 votes

Random Golf of the Day #1: Shuffle an Array

Perl, 68 56 44 Like many other solutions, this uses the Fisher-Yates algorithm. Using nutki's comment, 12 characters are saved by using $_ instead of $i and performing the operations in the array in …