All Questions

Filter by
Sorted by
Tagged with
0 votes
5 answers
275 views

Make a +-= Interpreter [duplicate]

+-= is a language created by Esolangs user Anonymous in 2017.The language consists of only three commands: + increases the accumulator by one. ...
user avatar
5 votes
6 answers
538 views

Batt to the Basics

One of your acquaintances has a hobby of making make-shift electrical gadgets using various types of batteries. However, since they're thrifty, they want to use as few batteries as possible for their ...
user avatar
7 votes
5 answers
419 views

Calculate the overlapping line

(l, r) defines a line whose left end is at l and the right end is at r, on a 1-dimensional ...
user avatar
  • 2,213
10 votes
6 answers
560 views

Fourth Time's the Triple Tap

The sci-fi shooter Destiny 2 contains guns which have the ability to regenerate ammunition directly into the magazine if, and only if x (precision) shots are landed ...
user avatar
13 votes
9 answers
948 views

Remove unmatched brackets

Inspired by @AviFS. Given a string containing brackets, e.g. [xyz]]abc[[def]hij[ You can parse through it with a stack of brackets. When you find an open bracket, ...
user avatar
  • 30.5k
19 votes
7 answers
1k views

Expand a matrix goo-ily

Input An \$m\$ by \$n\$ binary matrix, with \$m\$ and \$n\$ both at least 2. Think of the ones as gobs of melted cheese, which stretch as we expand the matrix horizontally and vertically. More ...
user avatar
  • 27.3k
10 votes
7 answers
284 views

Maximum population of a \$n \times n\$ still life in Conway's Game of Life

This is OEIS sequence A055397. In Conway's Game of life, a still life is a pattern that does not change over time. We can see from the rules of Conway's Game of life that, a pattern is a still life if ...
user avatar
12 votes
5 answers
246 views

Resolve a Super Auto Pets Round

In Super Auto Pets, players build teams of animals that face off in battles to the death unconsciousness. Each animal has an Attack and Health value, and combat occurs in iterations of the following ...
user avatar
9 votes
11 answers
1k views

Smallest numbers whose square has even number of digits

...
user avatar
  • 9,436
15 votes
11 answers
2k views

Satisfy as many people as possible

There are times when a large number of people need to choose something. They all want to get the stuff they choose, obviously, but it's impossible to please everyone that way, so a usual compromise is ...
user avatar
  • 2,849
13 votes
17 answers
1k views

The interstice of two binary numbers

Given two integers, compute the two numbers that come from the blending the bits of the binary numbers of equal length(same number of digits, a number with less digits has zeros added), one after the ...
user avatar
  • 436
12 votes
9 answers
487 views

Draw an ASCII envelope based on size input

You want to send an ASCII letter to someone, but you need an envelope to put it in. Your task is to output an envelope given a size as input. Rules: Given positive integer input ...
user avatar
-1 votes
5 answers
269 views

Output this string from the `kolmogorov-complexity` tag info page [closed]

kolmogorov-complexity is one of the tags on this site, representing challenges that test how much code is needed to output a given fixed result (usually a piece of text). The info page for this tag ...
user avatar
  • 1,719
19 votes
30 answers
2k views

Convert from variable-width Two's Complement to Integer

Take an input, and convert it from Two's Complement notation (binary where the first bit is negated, but the rest are taken as normal) into an integer (in a somewhat standard output form). Input can ...
user avatar
  • 1,298
10 votes
8 answers
2k views

How many times do I break my own rule?

Introduction: In my recent Strikethrough the Word Search List challenge I mentioned the following: When I do the word-search puzzles, I (almost) always go over the words in order, and strike them ...
user avatar
6 votes
15 answers
910 views

Spaceship shooter

Your task is to output a spaceship of size n with shooters/guns and n bullets of character - ...
user avatar
  • 3,029
40 votes
13 answers
4k views

Recreate Minecraft's lighting

Minecraft has a fairly unique lighting system. Each block's light value is either one less than the brightest one surrounding it, or it is a light source itself. Your task is to write a method that ...
user avatar
  • 691
11 votes
14 answers
876 views

Arrange a Haft-Sin table

It's Nowruz and you want to set up a Haft-Sin table by words. This means finding seven words that start with letter s. The Challenge Write a program which its input is a list of words separated by ...
user avatar
12 votes
14 answers
2k views

Sandbox overflow

Your task is to output a square sandbox of size n+2 with / characters in the corners and | ...
user avatar
  • 3,029
3 votes
2 answers
330 views

Calculate the highest possible period oscillator in Conway's Game of Life

Input: a whole positive number greater than 4 Output: A whole positive number that describes the highest possible period an oscillator could have inside a square space of size (input)x(input) in a &...
user avatar
  • 363
19 votes
12 answers
907 views

Convert between graph representations

What? Let's say I have this graph: 1 \ \ 2 3 \ / \ / 4 I can represent it in 2 ways: A list of connected vertices. ...
user avatar
  • 1,614
73 votes
57 answers
12k views

Draw the Ukrainian Flag

As you will probably know, there is a war going on in Ukraine. I noticed that it seems nobody has posted a Ukrainian flag challenge yet, so I thought I'd do it myself in support of Ukraine. The ...
user avatar
  • 3,350
10 votes
6 answers
419 views

The Missing Match

You are given a string of unknown length that contains a varied amount of (, {, [ and their ...
user avatar
  • 431
18 votes
15 answers
1k views

Long period primes

A long period prime is a prime number \$p\$ such that decimal expansion of \$1/p\$ has period of length \$(p-1)\$. Your task is to output this number sequence. For purposes of this challenge we will ...
user avatar
  • 11.7k
21 votes
26 answers
2k views

Randomly Rounding

Input a decimal number and round it to an integer, randomly rounding up or down with a probability based on its fractional part, so the expected value of the output equals to the input value. If ...
user avatar
  • 29.4k
15 votes
13 answers
1k views

Recursively rotate a ragged list

Given a ragged list of positive integers return a full cycle of recursive rotations starting with the unchanged input and ending with the state immediately before revisiting the initial state. ...
user avatar
  • 6,900
23 votes
5 answers
2k views

Implement a very simple ALU using only NAND gates

Note: This challenge was inspired by Joe Z's many excellent questions surrounding NAND golfing. Description Your goal in this challenge, should you choose to accept it, is to implement a very simple ...
user avatar
23 votes
32 answers
5k views

Negative of an ASCII photo

Task Given an \$m\times n\$ binary ascii "photo", return the negative of the photo Example: ...
user avatar
  • 1,151
4 votes
19 answers
552 views

Double bit rotation to the right [closed]

Given a positive integer as input, output that integer, but with its bits rotated two times to the right. Also, think of the number as a donut of bits, eg. ...
user avatar
12 votes
3 answers
274 views

Line Islands in a Word Search

My third word search related challenge in a row. :) Challenge: Brief explanation of what a word search is: In a word search you'll be given a grid of letters and a list of words. The idea is to cross ...
user avatar
19 votes
14 answers
1k views

Sort numbers in a ragged list

Given a ragged list, e.g. [[4, 7], [5, 3, [], [6, [2]]]] Your challenge is to sort only the numbers in it. For example, with the above, the result would be ...
user avatar
  • 30.5k
12 votes
26 answers
1k views

Circular chained compound

Task Given a positive integer n, output the joined compound of circles The circles are of square of size n+2 but removing the ...
user avatar
  • 3,029
7 votes
13 answers
1k views

Complex permutation

Given an array of integers as input(including negative integers), find all (can include duplicates) permutations that do not have the same number next to each other, then print them all out. If no ...
user avatar
19 votes
25 answers
2k views

Zip uneven lists

In this challenge you will take two lists as input and you will zip them. The zip can be defined with this recursive expression: \$ \mathrm{zip}(a,b) = \begin{cases} \left[\,\,\right] & a = \left[...
user avatar
  • 88.3k
3 votes
9 answers
1k views

int, float or neither?

Given a string, determine if it is an int, a float or neither. Examples 123 - int 62727.0033 - float 644c.33 - neither Your code should output a different value depending on which it is. For example ...
user avatar
  • 393
11 votes
7 answers
441 views

Sort musical pitches

Given an unordered list of musical pitches, write the shortest program/function (scored in bytes) to sort the list from lowest pitch to highest. Pitches will be given in scientific pitch notation, ...
user avatar
  • 10.5k
10 votes
2 answers
505 views

The maximum liberty of a group on a Go board

Bounty One of the convincing conjectures, by Loopy Walt is, ...
user avatar
  • 2,213
22 votes
17 answers
948 views

Pairs of integers ordered by their exponentiation

Output the infinite list of pairs of integers (a, b), where both \$ a > 1 \$ and \$ b > 1 \$, ordered by the value of \$ a^b \$. When there are multiple pairs ...
user avatar
  • 21.4k
26 votes
13 answers
871 views

Resolve references in a chat discussion

Sometimes in chat, if someone says something you agree with, you'll send a message with an ^, which points at the message above: ...
user avatar
28 votes
29 answers
2k views

Repeat List Until Longer

The Challenge The challenge is simple: given an input list a and another list b, repeat a ...
user avatar
  • 3,007
15 votes
9 answers
901 views

Count the Liberties

Background This challenge is about the game of Go. Go is a game played on a board with a square grid N x N. You don't have to know how to play the game to do this ...
user avatar
  • 2,213
2 votes
5 answers
146 views

Generate this string table [duplicate]

For the given string s, generate generate a table like below. ...
user avatar
  • 1,645
14 votes
16 answers
1k views

Building spikes

Inspired by this building (United States Air Force Academy Cadet Chapel, Colorado) Your task is simple, given a positive integer n, output the spiked building to ...
user avatar
  • 3,029
6 votes
2 answers
355 views

Reveal all clues of Black Box

Black Box is a board game, Your task is to reveal all clues. What is black box Black box is a board game with hidden atoms, Your task is given input, All atoms, reveal all clues. I/O Input The atoms ...
user avatar
  • 2,509
3 votes
5 answers
322 views

The Nineteenth Bakery [duplicate]

Yes, this is very similar to this question. However, that concerns infinite linked lists, and you do not need to handle out of bounds indexes in that question. You are in a strange city, looking for ...
user avatar
  • 3,007
16 votes
10 answers
1k views

Gray code on N symbols

A Gray code is a permutation on binary numbers where incrementing or decrementing a number only ever causes a single bit to change. For example, a Gray code for the binary numbers up to 7 (so, with 3 ...
user avatar
  • 21.4k
18 votes
9 answers
2k views

Is it irrational?

Your task is to make a program that decides if a real number between 0 and 1 is irrational or not. As stated, this is obviously impossible, so instead we will use the following definition: ...
user avatar
  • 6,705
12 votes
7 answers
661 views

S̶t̶r̶i̶k̶e̶t̶h̶r̶o̶u̶g̶h̶ the Word Search List

Introduction: Every workday I read the newspaper in the morning while eating breakfast, and also do some of the puzzles at the back. When I do the word-search puzzles, I (almost) always go over the ...
user avatar
14 votes
2 answers
536 views

Find the magic numbers to divide a number without division

An integer \$x\in[0,2^{32}-1]\$ divided by an integer \$d\in{[1,2^{31}]}\$ will produce an integral quotient \$q\$ and a remainder \$r\$, so that \$x=d\times q+r\$. Any \$q\$, in fact, can be ...
user avatar
  • 2,213
15 votes
3 answers
347 views

What was my Wordle play?

Task Given a winning Wordle play results (clues), the target ("secret") word and a list of words, output a possible sequence of words leading to such results. The words in the list will be ...
user avatar
  • 11.7k

15 30 50 per page
1
3 4
5
6 7
264