27 questions linked to/from Language Design: 2-D Pattern Matching
8k views

Is this string a square?

A string is considered to be square if the following conditions are met: Each line has the same number of characters The number of characters on each line is equal to the number of lines. Your task ...
• 9,377
7k views

Are the brackets fully matched?

You must write a program or function that takes a string of brackets and outputs whether or not that string is fully matched. Your program should print a truthy or falsy value, and IO can be in any ...
• 59.3k
18k views

Where's the 0xBEEF?

This challenge was inspired by this Wendy's commercial from 1984. Illustration by T S Rogers Your task is to find a hexadecimal 0xBEEF on a binary bun. The 'beef' consists of the following pattern: ...
• 193k
8k views

To find islands of 1 and 0 in matrix

Given a two dimensional matrix of 0 and 1s. Find the number of island for 1s and 0s where neighbours are only in the horizontal and vertical. ...
• 329
4k views

Hotel room numbering

Given an input of a "hotel" in ASCII art with a single room marked, output the room number according to certain rules. Here's an example of an ASCII hotel: ...
• 71.5k
5k views

Nether Portal Detection

The video game Minecraft is all about placing and removing different types of blocks in the 3D integer lattice that makes up the virtual world. Each lattice point can contain exactly one block or be ...
• 89.8k
2k views

Verifying a horizontal ASCII pet snake

Recently there have been a couple of ASCII pet snake challenges (e.g. here) ...
• 349
2k views

Official Ruby Inspector

Here is a simple ASCII art ruby: ___ /\_/\ /_/ \_\ \ \_/ / \/_\/ As a jeweler for the ASCII Gemstone Corporation, your job is inspect the newly acquired rubies ...
• 89.8k
3k views

Connect Four Validator

Introduction Connect Four is a game where you attempt to get four in a row: horizontally, vertically, or diagonally. In this code golf, we will be trying to find who won, given a game board. There ...
• 2,525
2k views

Mutually Attacking Queens

Let an 8x8 chessboard be represented by any two distinct values, with one value being an empty square and the other being a queen. In the following examples, I use 0s as the empty squares and 1s as ...
• 879
1k views

ASCII topology pt 1: Can I count on you?

I have a serious problem. I have some text files where I keep my very important numbers -- all of the important ones! And twos, and threes.. These numbers were so important that I couldn't entrust ...
• 1,054
2k views

Verify the queens puzzle

If you don't know what a queen is in chess, it doesn't matter much; it's just a name :) Your input will be a square of arbitrary width and height containing some amount of queens. The input board ...
• 16.4k
2k views

Can Mario go to the end of this map

Create a program that determines, given an input of the path, whether Mario can reach the end, denoted by E, from the start, denoted by ...
• 4,837
1k views

Recognize a vine

Background I have a bunch of old and grainy black-and-white images. Some of them depict vines climbing on a wall, others don't – your task is to classify them for me. Input and output Your ...
• 42.7k