# All Questions

13,380 questions
Filter by
Sorted by
Tagged with
6 views

### Join Columnar Strings

Write the shortest possible program or function that will join a list of columnar strings. For this challenge, columnar strings are defined as one-character-wide strings spanning across multiple lines....
• 4,393
9 views

### Make the cheapest cut

“Cut” a matrix of integers on the line where the sum of the absolute differences of “severed” neighbors is the least. Example Consider this matrix: ...
• 8,566
140 views

### Encoder/Decoder for efficient number storage!

Description Inspired by this question, write a program/function to encode a number and a program (possibly the same as the first) to decode a bitstream in variable-length encoding as follows (taken ...
• 2,158
681 views

### CGAC2022 Day 1: Let's build a chocolate pyramid!

Following last year's event, we're doing Code Golf Advent Calendar 2022! On each day from today (Dec 1) until Christmas (Dec 25), a Christmas-themed challenge will be posted, just like an Advent ...
• 67.1k
2k views

### Totally random Catan number distributions

I like to play (The Settlers of) Catan on Board Game Arena with totally random number tokens. These tokens determine the production rate of the terrain tiles beneath: There are 18 number tokens, two ...
• 1,263
97 views

### Bridges of Königsberg [closed]

This is a famous mathematical problem, Named as Bridges of Königsberg Task The bridges of Königsberg is a problem in mathematics which states that the path required for crossing each bridge exactly ...
2k views

### Range of ASCII values

Your task Given a string, output the range of ASCII values. Example Let's say we have the string Hello. We get the ASCII values: ...
• 3,362
1k views

### Shortest path between two directories

The challenge is to write a program which will find the shortest (least number of characters) command which will navigate to a target directory, given a starting directory, assuming a standard linux ...
• 149
1k views

• 9,971
502 views
+50

### Interstellar Cabbages, Wolves, and Sheep

The Cabbage, Wolf, Goat riddle with a twist! Backstory: There’s an intergalactic river than needs to be crossed! Being a space-ferryman you’ve offered some aliens on your small space ferry that can ...
• 271
2k views

### Number to letters

Your task Given a numerical string or integer $\ge 0$ (which may have leading zeros), convert it to letters using the below rules. Rules Loop through the digits: If the digit is ...
• 3,362
407 views

### Decide whether a given field of the board game 'Qwirkle' is valid (according to game rules)

The famous game of Qwirkle has simple but intricate rules (See part 2 of this question for a summary of the rules!) The Challenge You are somehow (text input, function parameter, whatever) given a ...
• 117
139 views

### Intermediate Boolean Algebra Calculator

Background With the success of Simple Boolean Algebra Calculator, I present a more difficult problem. Boolean Algebra concerns representing values with letters and simplifying expressions. The ...
178 views

### Transform a lattice polygon to minimum diameter by shearing

Given is a grid polygon by the list of its integer vertex coordinates arranged along the perimeter, in the form $(x_1,y_1), (x_2,y_2), \cdots , (x_n,y_n)$ with $n \ge 3$. The polygon is completed ...
677 views

### Implement Casio's M

The task Most Casio calculators featured a variable M, which has 3 operators related to it: M, ...
• 1,665
615 views

### LS, Part 1: Ana Gram

Warning: Wouldn't you rather answer a challenge about ponies?1 If you have read The Hostile Hospital, you would know that the Baudelaire orphans, from one of the scraps of paper recovered from the ...
• 1,554
2k views

### Farigiraf my Girafarig

A palindrome is a word that is its own reverse. I will define the left palindromic root of a word as the shortest prefix of the word for which the shortest possible palindrome that begins with that ...
• 17.3k
751 views

### Implement Perceptron

There was a previous perceptron question but it was closed. Also it required a lot of extra stuff that's not normally part of the perception algorithm like I know it. This question will be much ...
• 4,696
1k views

### Lengthy numbers type A : remove all occurrences of length

Given a non negative integer number tell if it can be erased by repeatedly removing all occurrences of the length of that number from it including overlapping matches. Erasing means cancel all its ...
• 10.4k
4k views

### 50 digits of π in HQ0-9+-INCOMPUTABLE?

Background HQ0-9+-INCOMPUTABLE?! is a half-joke programming language introduced in Internet Problem Solving Contest 2011, Problem H. HQ9+ is an esoteric programming language specialized for certain ...
• 67.1k
2k views

### Simple Boolean Algebra Calculator

Background Boolean Algebra concerns representing values with letters and simplifying expressions. The following is a chart for the standard notation used: Above is what actual boolean algebra looks ...
727 views

### As many near-repdigit primes as possible

A near-repdigit number is a positive integer where all the digits are the same, except one. For example 101 and 227 are near-repdigits. A near-repdigit prime is a near-repdigit that is also prime. For ...
• 1,339