1
vote
0answers
59 views

HTML2JSON Converter

Story This is based on a real world puzzle. A colleague had a very old program. It was announced to be discontinued by the company and then it was really discontinued in 2009. Now I should use that ...
8
votes
10answers
361 views

Construct a Ladder

Introduction I want to build a ladder. For this, I have scavenged from the junkyard two long boards with holes in them, and I want to place the steps into these holes. However, the holes are not ...
5
votes
1answer
108 views

ASCII Ice Cream

Write a program or function that takes in a positive integer N, and prints or returns an N×N ASCII art string whose top half is a semicircle made of ('s and whose bottom half is a downward-pointing ...
0
votes
0answers
44 views

Word search puzzle generation [on hold]

Given a list of strings, find the smallest square matrix that contains each of the initial strings. The strings may appear horizontally, vertically or diagonally and forwards or backwards like in ...
3
votes
0answers
72 views

Longest common substring

This challenge is about writing code to solve the following problem. Given two strings A and B, your code should output the start and end indices of a substring of A with the following properties. ...
10
votes
8answers
865 views

The Staircase Challenge

Your work is to recreate this piece of art: _____ | | | | _____| ...
6
votes
2answers
226 views

Prelude Syntax-Checker

Prelude is an esoteric programming language, which has very few, but unusual, restrictions on what constitutes a valid program. Any block of printable ASCII text ("block" meaning that lines of ...
16
votes
1answer
162 views

Water held in a hexagonal rod scuplture

I have bunch of hexagonal rods glued together into an odd sculpture. The rods are 1 to 99 centimetres (cm) long and 1 square cm in cross-section area. All rods are glued on a hexagonal face to at ...
-1
votes
0answers
34 views

How can I make my memoization of a recursive search run faster (i.e. what am I doing wrong here)? [on hold]

I am trying to solve a problem in which you have to count the number of possible bar codes you can make given specific parameters. I solved the problem recursively and am able to get the correct ...
11
votes
1answer
86 views

Analyzing Collatz-like sequences

We define a Collatz-like sequence s with 4 positive integers: n starting value d > 1 divisor m > 1 multiplier i increment (In the original Collatz sequence d = 2 m = 3 and i = 1.) Given ...
20
votes
28answers
2k views

Check whether letters of word are in alphabetical order

Write a function/program that accepts a string of lower/uppercase letters [A-Za-z] as input, that checks whether the occuring letters are unique and in alphabetical order (ignoring lower and ...
1
vote
0answers
51 views

Solve a Date Shift Cipher [duplicate]

Introduction In this challenge you will be solving date shift ciphers. Here is a general overview of what a date shift cipher is. To encode a message, you first must make a key. A key in a date shift ...
5
votes
3answers
100 views

Topping the Charts

Topping the Charts You are a record label company. Your goal is to get 4 of your signed bands in the top 4 positions in the charts. However, its recently been noted that bands currently in the ...
14
votes
1answer
276 views
+100

Finding all-but-one matches

This challenge is about writing code to solve the following problem. Given two strings A and B, your code should output the start and end indices of a substring of A with the following properties. ...
6
votes
7answers
231 views

Pseudo-cyclic Number Evaluator

For the purposes of this challenge, let's define a cyclic number as an integer that passes the basic part of Midy's Theorem, but not necessarily the extended theorem. This means: the digits in the ...
14
votes
16answers
2k views

From 0 to 2^n - 1 in POPCORN order

... Ah sorry, no popcorn here, just POPCNT. Write the shortest program or function which takes in a number n and output all integers from 0 to 2n - 1, in ascending order of number of 1 bits in the ...
19
votes
2answers
302 views

Golf Down the PPCG Usernames

A comment I made in chat and the ensuing conversation inspired me to make this challenge. Am I the only one referred to by initials around here? We are all about golfing things down. We can have ...
11
votes
6answers
715 views

Solve a Diagonal Burrows-Wheeler transform

Introduction In this challenge you will be solving diagonal Burrows-Wheeler transforms. Here is a general overview of what a diagonal Burrows-Wheeler transform is. To encode a message, you first must ...
5
votes
5answers
233 views

Water Balloon Wars

This king-of-the-hill game is a strategy game in which you must throw around a water balloon and avoid getting splashed by water. The goal is to obtain the most points. You will be given a map of the ...
2
votes
1answer
131 views

Find a numeric coincidence when representing numbers in various bases

Recently, when doing some code-golf challenge, I came up with with two solutions, in 69 and 105 bytes. It's a remarkable coincidence, because: 69 (decimal) = 105 (octal) 69 (hexadecimal) = 105 ...
9
votes
3answers
303 views

Dollar Divisibility and Perfect Change

I have $15 in my pocket. Likewise, I am in a store which doesn't give change. While browsing, I spot an item that costs $10 (tax included). Can I buy that item without losing any money? In this ...
6
votes
1answer
194 views

Paeth-transform arrays

One of the key parts of PNG's compression algorithm is the Paeth transformation, which transforms the image in a way that makes it compress better (usually). In this challenge, your task is to write a ...
6
votes
5answers
173 views

Almost Lexicographical List Comparison

Input Two lists A and B of nonnegative integers. Output Either 1, 0, or -1, depending on whether A is larger than, equal to, or smaller than B with respect to the twisted lexicographical ordering ...
32
votes
6answers
3k views

Write a Quine in Plain English

Write a quine that consists of real English words separated by single spaces. A "word" is defined as a string containing only lowercase and uppercase letters (/[a-zA-Z]+/ in regex). To be "real" your ...
9
votes
1answer
1k views

Am I code-golfing properly?

I am curious if I am Code Golfing properly. I set the challenge for myself to make a small hashing program into a single statement in Python. I first started off with: from itertools import ...
12
votes
9answers
307 views

KOTH : Monster Hunter

Updated Results Introduction To celebrate Monster Hunter 4 Ultimate launch on new 3DS (February 13th), here's a King of the Hill themed on this game. You are a novice hunter, who'll take part in a ...
44
votes
16answers
5k views

Sierpinskified Code

Write a rectangular block of text that when arranged into a Sierpinski carpet, using same-sized blocks of spaces for the empty portions, creates a program that outputs the iteration number of the ...
-1
votes
0answers
88 views

Use echo to output -n [closed]

This is the challenge: in Bash, use the echo command to output -n. -n should be on a line by itself that contains nothing else.
6
votes
3answers
656 views

Tips for golfing in ><> (Fish)

Since I've been seeing more ><> submissions floating around lately, I thought it might be a good idea to have a tips page. Please stick to one tip per post, unless they are closely related. ...
14
votes
2answers
305 views

Food shortage in the Snakepit

Food shortage in the Snakepit For the first time in 35 years, the snakepit is running out of food. The inhabitant snakes now have to fight each other in order to survive this food shortage. Only one ...
8
votes
6answers
296 views

List the Cases of Two Finnish Nouns

Introduction In this challenge, your task is to correctly list the cases of two Finnish nouns. The twist is that you may use one of the listings as a guide to produce the other. The Nouns We use ...
7
votes
1answer
995 views

Python 3 - Tried Golfing My Assignment

Note: This isn't as much a golfing challenge; it is more so asking for golfing suggestions. Recently I had a Python assignment for my web development class, in order to check whether we could code. ...
14
votes
16answers
2k views

Different Way Forward

Given a list of integers produce a Forward Difference at a specified order/depth. For the list of integers: (10, 18, -12, 4, 8, -3, -5, 67, 9, 14) The Forward Differences at the various ...
13
votes
11answers
863 views

Random Golf of the Day #3: Integer Partitions

About the Series First off, you may treat this like any other code golf challenge, and answer it without worrying about the series at all. However, there is a leaderboard across all challenges. You ...
-4
votes
0answers
57 views

Server Error on Link Visit, Successful Display after homepage visit [closed]

I was inspired by a link a friend sent me: http://www.karoistanbul.com/tr-Tr/category/30x35-hexagon-tiles?ID=38#prettyPhoto When you visit this link, you will get a Server Error. The error I see ...
19
votes
6answers
1k views

A Mnemonic for Remembering 23940

The major system is a mnemonic device for converting numbers into words so they can be memorized more easily. It is based on how words sound phonetically, but to keep things simple for the challenge ...
17
votes
2answers
820 views

Vim - surround comment line with comment character

Today I realised that I often like to define sections in my code like so: #################### # Helper Functions # #################### But that it's tedious to do. Assuming I have a line such as ...
-1
votes
0answers
50 views

Write a polyglot in as many languages as possible [duplicate]

(Wikipedia article on polyglots)[http://en.wikipedia.org/wiki/Polyglot_(computing)] A polyglot is a program which will compile in 2 or more languages. For this chanllenge, try writing one that would ...
2
votes
1answer
165 views

count number of valid, unique sequences for moving on a 1xn board [closed]

There's a board with n squares in a horizontal row. You start in the leftmost square, and roll a 3-faced dice. 3 possible outcomes for a single roll of the die: Left: you move 1 step to the left, ...
6
votes
5answers
586 views

Rosetta Stone Code Golf Challenge: Print Certain Numbers; all snippets must be same length

Rosetta Stone Code Challenges are challenges where you must complete the task in as many languages as possible. The Challenge You will be given two numbers, n and s, in a list as input. The n will ...
10
votes
1answer
193 views

Generate a Davenport-Schinzel Sequence

Background A Davenport-Schinzel sequence has two positive integer parameters d and n. We will denote the set of all Davenport-Schinzel sequences for given parameters by DS(d,n). Consider all ...
3
votes
3answers
245 views

Noel Constant's idiotically simple investment system

Noel Constant did it without genius and without spies. His system was so idiotically simple that some people can't understand it, no matter how often is is explained. The people who can't ...
8
votes
2answers
571 views

Finding Programs in the Primes

Let's assign the numbers 0 through 94 to the 95 printable ASCII characters: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Space is 0, ! is 1, and ...
35
votes
3answers
690 views
+100

Sometimes I need a Lossless Screenshot Resizer

Sometimes I need to write more documentation than just comments in code. And sometimes, those explanations need screenshots. Sometimes the conditions to get such a screenshot are so weird that I ask a ...
-2
votes
0answers
46 views

Problem with importing SQL dump to the new server [closed]

Got a buck-up for mySQL database but I can't import it. May be problem that is mySQL version are newer on new server but anyway I cant access to the old server to make back-up again. First problem was ...
20
votes
12answers
2k views

Reading Code in 8 Ways to Output 8 Numbers

The English language and most programming languages are written and read from left-to-right, top-to-bottom, but that needn't be the case. In fact for the block of text ABC DEF I can think of eight ...
18
votes
2answers
463 views

Help me procrastinate on my computer repairs!

This challenge is brought to you by real (and tragic) inspiration. Recently, the number row on my keyboard has been a bit sporadic. The keys 1-9 work sometimes--but other times they have no result. As ...
11
votes
7answers
1k views

Finding prime numbers without using “prime characters”

Your task, if you choose to accept it, is to write a program/function that accepts an integer N as input. The program/function should output/return a list of the first N prime numbers. But here's the ...
11
votes
4answers
414 views

Identifying the triangles

Counting the amount of triangles in a picture is a task commonly used in brain tests. You are given a picture that contains shapes consisting of triangles. You then must find all possible triangles in ...
17
votes
9answers
632 views

Grid-Routing Battle

This is a semi-cooperative king-of-the-hill challenge, where the bots construct paths through a two-dimensional grid graph. The bot who controls the nodes with the most traffic is the winner. However, ...

15 30 50 per page