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.
3
votes
Get the trends of an array
Vyxal, 14 bytes
¯±ĠvL0p¦2lvƒṡİ
Try it Online!
Port of Unrelated String's Jelly answer.
ĠvL # Get the lengths of the runs of identical...'
± # Signs
¯ # In the for …
2
votes
Draw an ASCII envelope based on size input
Vyxal o, 37 bytes
\_*:£ðpm,ċ[ɽ‹\\꘍ṫ\_+J↲¥J\|vpvøṀ⁋|‛|\m
Try it Online!
\_* # <input> copies of _
:£ # Duplicate and set gregister
…
15
votes
Average-ignorant sets of integers
A simple greedy approach gives the set [1, 2, 4, 5, 10, 11, 13, 14...]. This is probably optimal.
It can be constructed by:
Start with the set [1]
Forever:
Take the maximum value of the set, double …
13
votes
Egyptian fraction representations of 1
Vyxal, 10 bytes
¡ɾṗ'Ė∑1=;t
Try it Online!
Bruteforcer. \$O\left(2^{n!}\right)\$ time complexity, searches for fractions with reciprocals \$ n! \$ which seems to be enough.
¡ # Factorial
ɾṗ …