# Tag Info

Accepted

### Index of a multidimensional array

APL, 1 byte Test it on TryAPL.
• 210k

### N-dimensional N^N array filled with N

Python, 32 bytes lambda n:eval('['*n+'n'+']*n'*n) Try it online! Makes a string like "[[[n]*n]*n]*n" with ...
• 146k

### Be the First 1 (leave only the first Truthy)

Python 2, 35 bytes while 1:b=input();print b;True&=b<1 Try it online! Input and output are lines of True/False. Based on Dennis's solution. Redefines the ...
• 146k

### Moving modest minimum

Python 2, 41 bytes lambda l:[sorted(l)[x==min(l)]for x in l] Try it online! For each element x we check whether ...
• 146k
Accepted

### Flatten the Array!

K, 3 bytes ,// This is a fairly common idiom. "Join over converge". try it here with oK. How it works: Join (,) fuses ...
• 5,062
Accepted

### Count trailing truths

Dyalog APL, 6 2 bytes ⊥⍨ Test it on TryAPL. How it works ⊥ (uptack, dyadic: decode) performs base conversion. If the left operand is a vector, it performs ...
• 210k

### Remove surrounding zeroes of a 2d array

Wolfram Language (Mathematica), 42 bytes #&@@CellularAutomaton[{,{},0{,}},{#,0},0]& Try it online! Cellular automata are indeed the answer to life, the ...
• 13.8k

### Output a string's cumulative slope

Python, 29 bytes lambda s:ord(s[-1])-ord(s[0]) The sum of the differences forms a telescopic series, so most summands cancel out and (s1 - s0) + (s2 - s1) + &...
• 210k

### Flatten the Array!

JavaScript (ES6), 35 bytes Inspired by @user81655's answer: f=a=>a.map?[].concat(...a.map(f)):a
• 1,047
Accepted

### Is it true? Ask Jelly!

Jelly, 3 bytes ṭFẠ F flattens the input list. tacks on the original input list as an ...
• 3,664
Accepted

### Be the First 1 (leave only the first Truthy)

APL, 2 bytes <\ Evaluates to the function "scan using less-than". Try it online! Explanation In APL, the operator \ (...
• 42.7k

### Covering a Skyline with brush strokes

JavaScript (Node.js), 38 bytes a=>a.map(v=>(n+=v>p&&v-p,p=v),p=n=0)|n Try it online! Simply a greedy algorithm which scan from left to right, ...
• 35k

### Sum the array times n, except the last

J, 3 bytes That was fun to find. &+/ Try it online! How it works 10 (&+/) 3 1 4 1 5 will bind ...
• 11.3k

### N-dimensional N^N array filled with N

J, 4 bytes \$~#~ Try it online! Explanation ...
• 17k

### Execute a Superb Shuffle™

Ruby, 31 bytes ->x{(0..53).map{|r|x[r*17%54]}} Try it online! Explanation: I'm picking one card, then skipping over the next 16 and start from the first card ...
• 22.2k

### Turn an integer n into a list containing it n times

Jelly, 1 byte x Try it online! Note that this is not the “repeat n n times” built-in — ...
• 68.9k

### Halve the falses

Retina, 4 bytes 00 0 Try it online!
• 197k
Accepted

### Find the longest word in an array

Imperative Tampio, 168 bytes ...
• 5,127

### Detect heat waves

C (gcc), 88 75 73 bytes Saved two bytes thanks to ceilingcat. h,e,a;t(int*_){for(h=e=a=0;*_;h+=e>4&a>2)e=*_<25?a=0:++e,a+=*_++>29;e=h;} Try it ...
• 7,341

### Covering a Skyline with brush strokes

05AB1E,  8 7  5 bytes Saved 2 bytes thanks to @Adnan 0š¥þO Try it online! How? This is using the algorithm that was first found by @tsh. If you like this answer, ...
• 194k

### Invert a boolean array

05AB1E, 1 byte Code: _ Explanation: _ # Logical not Try it online!
• 44.5k

### Implement Takewhile

Mathematica, 18 bytes #~TakeWhile~EvenQ& Another glorious built-in that is beaten by a factor of 3 by golfing languages without the built-in...
• 197k

### Find the minimum and maximum integers in an array, without using builtins

Jelly, 3 bytes Ṣ.ị Try it online! Sort the array, and then takes the 0.5-th element. Jelly uses 1-indexing, and floating points indexing means take its floor ...
• 49.9k

### Determinant of an Integer Matrix

Jelly, 15 bytes LŒ!ðŒcIṠ;ị"Pð€S Try it online! How it works ...
• 49.9k

### Sum the array times n, except the last

JavaScript (ES6),  28  23 bytes Saved 3 bytes thanks to @Mukundan314 Expects (A)(n). A=>n=>eval(A.join*n+) Try it ...
• 194k

### Implement Takewhile

Haskell, 13 bytes fst.span even span splits the input list into a pair of lists just before the first element where the ...
• 35.9k
Accepted

### An Array of Challenges #1: Alternating Arrays

Jelly, 4 bytes ḣ2ṁ⁼ Try it online! How it works ...
• 210k

### Reconstruct a list from its prefixes

Python 3, 51 bytes lambda l,p=0:[-p+(p:=x)for x in sorted(map(sum,l))] Try it online! Take the sums of the input lists, sort them in increasing order, take ...
• 146k
Accepted

### Count My Change

Japt, 5 3 bytes ñg9 Test it online! Explanation I, too, have added a sorting function to my language in the last few weeks :-) ...
• 50.1k