Search Results
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) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Code-golf is a competition to solve a particular problem in the fewest bytes of source code.
0
votes
Pointers, pointers, pointers!
PowerShell Core, 29 27 bytes
$args[1]
'^'|% *ft $args[0]
Try it online!
-2 bytes thanks to Mazzy!
2
votes
Produce a List of Rotonyms 2
PowerShell Core, 131 bytes
($t=$args|%{@{r=0..($l=($k=$_).Length-1)|%{-join$k[-$_..($l-$_)]}
w=$_}})|%{$u=$_
$t|?{$u.w-ne$_.w-and$u.w-in$_.r}|%{$_.w}}|sort|gu
Try it online!
For each word in the lis …
2
votes
The Unaverageables
PowerShell Core, 68 bytes
($a=$args)|?{$_-notin($a|%{$a-ne($c=$_)|%{$_,$c*(($_+$c)/2-in$a)}})}
Try it online!
3
votes
Output / Convert to unary number
Alice, 15 bytes
/ M \1*.n$@9ot
Try it online!
The new line at the end of the code is required
Uses tab as the output character
/ M \1*.n$@9ot # Full program
/ M \1* # Reads one argument …
1
vote
Compute the conjugate of a partition
PowerShell Core, 37 bytes
1..($a=$args)[0]|%{($a-ge++$i).Count}
Try it online!
Takes a list of integers, returns a list of integers
1..($a=$args)[0]|%{($a-ge++$i).Count}
1..($a=$args)[0]|%{ …
1
vote
One-Dimensional Pinball
PowerShell Core, 85 bytes
filter f{param($c,$s)&({$c},{2*($s[$_]=!$s[$_])-1+$_|f($c+1)$s})[$_+1-in1..$s.Count]}
Try it online!
Recursive filter
Takes an array of booleans
true for <
false for >
Re …
0
votes
Fixed Repeating Output
PowerShell Core, 13 bytes
,1*"$input"
0
Try it online!
Outputs to stdout and is newline separated
Uses the $input variable to access stdin
,1*"$input" # generate an array of 1 of the size of $input …
0
votes
Caesar equivalence
PowerShell Core, 68 66 bytes
$a,$b=$args;(1..$a.Length|%{($a[--$_]-$b[$_]+26)%26}|gu).count-eq1
Try it online!
(1..$a.Length # Builds an array of the size …
1
vote
The Last Monday
PowerShell Core, 73 65 bytes
param($a)1..12|?{"$_/1/$a"|get-date|% *hs 1|% *ys -1|? d*k -eq 1}
This requires the regional settings to use the en-US date format.
Explanations
Assumes the year is a st …
2
votes
Print the missing characters
PowerShell Core, 39 32 bytes
$a=$args
' '..'~'|?{$_-cnotin$a}
Added splatting and case sensitivity
Try it online!
Inspired by colsw's answer
2
votes
Follow a linked list
PowerShell Core, 27 22 bytes
for(){($i=$args[+$i])}
-5 bytes thanks to mazzy!
Try it online!
0 indexed, takes the list as an array as parameters and outputs the result list on the standard output
1
vote
Rocket Liftoff!
PowerShell Core, 37 bytes
10..1|%{"Liftoff in T-$_"}
"LIFTOFF!"
Try it online!
2
votes
There Was an Old Lady
PowerShell Core, 503 484 bytes
$i=" bird"
$k=" swallowed"
$g="She$k the"
$h=" to catch the"
$c="There was an old lady who$k a"
$e=" to swallow a"
$s=" spider"
"$c fly."
$c="`n$c"
($a="I don't know wh …
1
vote
The n-th Ternary
PowerShell Core, 52 38 bytes
param($a)(1..$a-join' ? ')+' : 0'*--$a
Try it online!
Save 14 bytes thanks to mazzy!
3
votes
Divisible strings
PowerShell Core, 40 33 bytes
$l=$args.Count
!($args|?{+$_%$l})
7 bytes saved thanks to mazzy
Try it online!