All Questions
6
votes
4answers
48 views
Compute the Eulerian number
The Eulerian number A(n, m) is the number of permutations of [1, 2, ..., n] in which exactly m elements are greater than the previous element. These are also called rises. For example, if n = 3, there ...
15
votes
10answers
1k views
Take a ride on the Reading, If you pass Go, collect $200
Monopoly Board
For this code-golf challenge we will be building the board game Monopoly.
Rules:
Take no input.
Output a 11x11 board where each ASCII character forming the board is the first letter ...
4
votes
0answers
97 views
Ungolf batch programs [on hold]
This question wants you to golf batch programms. In Batch you can use
set x=averylongbatchcommand
%x% arg1
which expands to
set x=averylongbatchcommand
averylongbatchcommand arg1
Your task is it ...
12
votes
7answers
903 views
Find the Centroid of a Polygon
From Wikipedia:
The centroid of a non-self-intersecting closed polygon
defined by n vertices (x0,y0),
(x1,y1), ...,
(xn−1,yn−1) is the point (Cx,
Cy), where
and ...
8
votes
0answers
56 views
Tips for golfing in Starry
Does anyone have any tips for golfing in Starry? Any golfing tips that are specific to Starry are welcome.
34
votes
51answers
2k views
N(e(s(t))) a string
To "function nest" a string, you must:
Treat the first character as a function, and the following characters as the arguments to that function. For example, if the input string was Hello, then the ...
6
votes
2answers
194 views
String Calculator
Assume you're writing in one method, (or whatever you call them) with 3 inputs: the first string, a character that contains a +, - or * symbol, and the second string.
Example in Java:
public String ...
15
votes
21answers
928 views
Spaced-out numbers
Given a list of N non-negative integers, output those numbers with each left-padded by spaces to a length of N. (Alternatively, return a character/string list.) You may assume that N is greater than ...
0
votes
1answer
94 views
The brain is smarter than you think [duplicate]
As you may (or may not) know, the human brain is very good at filtering stuff out. Making things easier for us. Take the next sentence for example:
Tihs is a vrey esay seetcnne wtih smoe lnog wdros ...
-5
votes
0answers
78 views
According to C Programming [on hold]
Write a program that prints out two stored numbers with the larger number printed first. Test your
program on identical values. Modify it to display a suitable message if the numbers are identical.
13
votes
1answer
178 views
Play a game of Yahtzee
In the game Yahtzee, players take turns rolling 5 6-sided dice up to three times per turn, possibly saving dice between rolls, and then selecting a category they wish to use for their roll. This ...
28
votes
12answers
6k views
Make an ASCII bat fly around an ASCII moon
Background
Here is a Halloween related challenge.
As you may have seen from my last challenge I quite like what I term as ascii art animations, that is not just draw a pattern but draw a pattern ...
32
votes
9answers
2k views
Find the Infinity Words!
(Note: This is a spin-off of my previous challenge Find the Swirling Words!)
Definition of Infinity Word:
If you connect with curves all the characters of an Infinity Word on the alphabet (A-Z) you ...
5
votes
3answers
250 views
Image Smoothie!
Input into your program a black and white image. (png, jpg, etc)
Convert the image to a 2D matrix of pixels, where each index is the grayscale value of the image.
Take each index of the matrix and ...
6
votes
7answers
253 views
Display a Connect Four game
Connect Four is a game where two players take turns to drop disks into columns of a vertically mounted grid, and attempt to connect four disks orthogonally or diagonally. When a column is chosen, the ...