# All Questions

13,232 questions
Filter by
Sorted by
Tagged with
1k views

### Flood fill by distance

Say I have a grid with some obstacles: ---- | X | | | |XX | | | ---- I can fill this with numbers, as distance from the top left corner. But, because ...
• 31.5k
2k views

### Check a mushroom forest

In this challenge you will receive a list of pairs of non-negative integers representing a mushroom forest. Each pair represents a mushroom whose center is at that horizontal coordinate. The only ...
• 89.4k
2k views

### Can a?b<c:b>c be shortened in Javascript?

So I have the situation where I have one boolean value a and, if that one is true and b<c ...
2k views

### The Unaverageables

Related. Given a list of 3 or more positive integers, remove every number X for which there is another number Y in the list and the average of X and Y is also in the list. In other words, if X, Y, and ...
• 2,395
975 views

### Iterative Smallest Complement

For this challenge, we will define the "complement" of a list of integers A as being any list B such that the union of ...
• 2,395
2k views

### How tall are the mushrooms?

In this challenge you will receive a list of non-negative integers. Each one represents a mushroom with a cap of that radius centered at that location. So a 0 ...
• 89.4k
3k views

### How far from binary?

Given a decimal integer n as input, output the smallest (in terms of absolute value) decimal integer m such that the absolute ...
• 36.6k
2k views

### Find the walls!

This is a simpler variant of my previous challenge Don't touch the walls!, as suggested by Jonah. Given a multi-dimensional rectangular array of integers between 0 and 9, output all the elements ...
• 22.2k
1 vote
355 views

• 489
2k views

### Make a list flat

Lists can contain lists and we have nested lists. But we don't like nested lists and want to flatten them. By flattening I mean create a list which does not contain any list, but elements of lists it ...
2k views

### Scribble Pad for Nerds

aka. implement an easier version of 05ab1e's canvas element. Description The canvas element is used to draw ASCII lines on the screen. The (easier version of the) canvas element takes a list of ...
• 4,621
69 views

• 22.2k
69 views

### Tips for golfing in J-uby

J-uby is the Language of the Month for June 2022, so I'm looking for tips for golfing in it. As usual, please post one tip per answer, and avoid general tips such as "remove whitespace" or &...
• 8,986
1k views

### Extract the contained powers of two!

Take as input an integer in any reasonable format. Then, output all the proper sub-strings of the base-10 digits of that integer that are powers of two, in any reasonable format. Test cases ...
• 1,443