Newest Questions
14,472 questions
- Bountied 2
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
129
views
Tips for making a compiler that generates a golfed program
I would like to create a language that is specifically designed for compiling/translating to another Turing tarpit language. I want to make the program of the target language to be as short as ...
17
votes
18
answers
1k
views
Peg solitaire starting position
Write a program/function to output a peg solitaire board in its starting position:
●くろまる ●くろまる ●くろまる
●くろまる ●くろまる ●くろまる
●くろまる ●くろまる ●くろまる ●くろまる ●くろまる ●くろまる ●くろまる
●くろまる ●くろまる ●くろまる ○しろまる ●くろまる ●くろまる ●くろまる
●くろまる ●くろまる ●くろまる ●くろまる ●くろまる ●くろまる ●くろまる
●くろまる ●くろまる ●くろまる
●くろまる ●くろまる ●くろまる
...
17
votes
22
answers
1k
views
Find the first relabeling
I had this problem come up for me recently and I thought it would make a fun code-golf.
You will receive as input a list of positive integers. e.g.
...
16
votes
11
answers
2k
views
A million and one constants
When code golfing, it can be useful to write numbers succinctly. This challenge involves using a source language to generate code for a target language. For the submission to be valid, it must ...
8
votes
6
answers
731
views
How does the NSDT program end?
Challenge:
NSDT is like a calculus model invented by me that contains only 4 commands and grouping. Your task is to check in which way the program ends. The program is read from left to right. There ...
3
votes
4
answers
731
views
Emoji-art sunburst
Write a program or function to output an N x N sunburst image made of red, orange and yellow emoji icons.
For N=40, it should look roughly like this:
...
17
votes
10
answers
1k
views
Output the colour code of a given resistance
Should be relatively easy to do, given an input of a resistance (in ohms) and a tolerance (%), output the colour codes for a 4 band resistor, left to right. Input will always be a valid ohm value and %...
12
votes
2
answers
223
views
Autocomplete a word at the cursor position
You will be given a block of text and a cursor position at the end of a possibly incomplete word.
You must output a suggestion for what this word (let's call it w) ...
Ted's user avatar
- 2,407
12
votes
16
answers
1k
views
Sum of Neighbours in a 2D Grid
This is the 2D version of Sum of neighbours: Given a 2D grid of integers, output a grid of the same size where each cell contains the sum of the values of its orthogonal and diagonal neighbors (up to ...
5
votes
1
answer
324
views
Implement 2x using the polynomial system
Your job is to implement \2ドル^x\$ using polynomials, such that in a way that for all integers \$x\$ and \$y\,ドル
$$\exists(v_0,v_1,\dots)[P_1(x,y,v_0,v_1,v_2,\cdots) = 0 \land P_2(x,y,v_0,v_1,v_2,\cdots)=...
12
votes
9
answers
1k
views
Exit a pinball board
You will be given a pinball board with a ball on it. Determine where the ball will exit the board. The ball will fall straight down, unless obstructed by a left or right bumper, in which case it will ...
-4
votes
3
answers
302
views
Render a polygon...in ASCII [closed]
Given the anti-clockwise points of a properly formed, non-self-intersecting, not-necessarily-convex polygon, render it as a filled ASCII art polygon.
Input
A series of at least 3 (x,y) pairs ...
2
votes
1
answer
300
views
Code Golfing in Bash
I'm pretty new to code golfing, but I recently came across a guy on Kattis that consistently has exactly 5 character Bash solutions for some problems. For example, here is a leaderboard showing his 5 ...
12
votes
15
answers
2k
views
Unroll the loop!
A loop is a rectangle of text like this:
hgf
ile
jkd
abc
To unroll it, you start at the bottom left, and proceed to the right, spiralling anti-clockwise in towards ...
21
votes
10
answers
2k
views
"e" ejects the letters. Re-enter them
Overview
I have a sample of 10 quotes. You will receive as input to your program one of these quotes, however all the vowels (aeiou) will be replaced with the ...