Share Your Experience: Take the 2024 Developer Survey

# Tag Info

JavaScript (ES6),  62 58 49  46 bytes Saved 3 bytes thanks to @Oliver Returns the list as a comma-separated string. ...
• 193k
Accepted

### Bumping Series Implementation

Charcoal, 21 bytes ＮθＩ⊘×⊕θＸ²↔⁻θ⊕×⊖⌈₂θ⌈₂θ Try it online! Link is to verbose version of code. Outputs the nth term. Explanation: <...
• 171k

### RADD decomposition of an integer

C++11 (gcc), O(log(n)) This algorithm can check, if a number n has a RADD-decomp and calculate the decomp in O(D)=O(log(n)), where D is the number of digits. It also includes a pre-test, with shorter ...
• 221

### Compute how many are no larger than each item in an array

Python, $O(n \frac{\log n}{\log \log n})$ Uses the approach from the paper "Optimal Algorithms for List Indexing and Subset Rank". ...
• 10.5k

### Sum of the sum of all possible subsets raised to power k

Python, $\mathcal O(NK^2)$ ...
• 16.7k

• 35.8k

### Pick a random string at a fixed edit distance

Python, 3453 bytes ...
• 3,301

TI-BASIC, 54 bytes Ans→L₁:dim(L₁→dim(L₂:While 1-Ans:L₁(Ans→L₂(Ans:-ΔList(L₁→L₁:dim(Ans:End:L₁(Ans→L₂(Ans:L₂ Input is the list of the right side of the triangle ...
• 2,603

### Is this number a palindrome?

APL (Dyalog Unicode), O(1) ⊃∘'111111111110… …...
• 30.3k

### Pick a random string at a fixed edit distance

Python, 932 bytes, $O(4^k\cdot n^{2k+2})$ ...
• 6,015
Accepted

### Find the longest uninterrupted arc

JavaScript (Node.js), O(n), 234 229 228 211 bytes ...
• 24.4k
Accepted

### Remove entries from array to sort it and maximize sum of elements

Haskell, $O(n \log n)$ time, $O(n)$ space ...
• 39.7k
Accepted

### Leon's shooting range problem

Area-based algorithm, $O(k^2+n\log(k))$ Our general strategy is to instead select points (outside the sticker rectangles) from the square (-1,-1) to (1,1), then repeat if we don't get a point within ...
• 16.3k

### Bumping Series Implementation

Jelly, 13 bytes Port of Neil's answer (I was working towards it myself but he nailed it). Unsure of the complexity of this closed-form formula, but think it is $O(M(B(n))B(n))$ where $n$ is the ...
• 107k

### (Cops) Fast and Golfiest Season 1: The Lord of the Strings

ATOI string to integer, 130 Bytes, Python 3 (IDLE), probably $O(n)$ or worse, 9:10 am UTC (it's DST in uk), Cracked in 18 min, so 0 points :( 4 points under new system :) ...

### Compute how many are no larger than each item in an array

Python, $O(n \log n)$ Simple algorithm based on merge sort that runs in $O(n \log n)$ for inputs in any range (assuming comparisons are $O(1)$). ...
• 39.7k

### Approximate floating point number with n-digit precision

Haskell, O(10p) in worst case 121 119 bytes ...
• 1,794
Accepted

### Fastest way to perform the equivalent of an if-statement in x86 assembly

And then I realised that we can be faster, and use no additional registers: ...
• 1,135

MathGolf, 14 11 bytes xÆ‼├│?;∟;]x Try it online! Explanation ...
• 6,897

Jelly, 6 bytes ṚIƬZḢṚ A monadic Link accepting a list of integers which yields a list of integers. Try it online! How? Builds the whole triangle then extracts ...
• 107k
Accepted

### How many ways can given subsequence occur in given sequence?

Ruby, $\mathcal{O}(nm)$ I think I got the analysis for this right. Should be $\mathcal{O}(nm)$ because for each of the $n$ characters in the master sequence, it goes through at most $m$ steps ...
• 12.6k

### (Cops) Fast and Golfiest Season 1: The Lord of the Strings

Concatenated Words, Python, 177 bytes, $O(n)$ time assuming input is a set where $n$ is the number of words, Cracked by Cursor Coercer, 7 points This is $O(2^L)$ where $L$ is the length of ...
• 12.6k

### (Cops) Fast and Golfiest Season 1: The Lord of the Strings

Removing Stars From a String, C (GCC), 47 bytes, $O(n)$ complexity, Cracked by jimmy23013, 25 points f(char*s){for(char*p=s;*s-42?*p++=*s:p--;s++);} Attempt This ...
• 2,483
Generate Parenthesis, ><> (Fish), 178 bytes, $O(n!)$, Cracked by C-- Time: 2023-07-21 12:35:24Z Hover over any symbol to see what it does. If this appears glitched unformulated version ...
Python, $\mathcal{O}((n+k)^{2k})\leq\mathcal{O}(4^k n^{2k})$ ...